Skip to main content

QueryBuilder

Trait QueryBuilder 

Source
pub trait QueryBuilder {
    // Required methods
    fn push_sql(&mut self, sql: &str);
    fn push_identifier(&mut self, identifier: &str) -> BuildQueryResult;
    fn push_typed_value(&mut self, value: &TypedValue) -> BuildQueryResult;
    fn push_bind_param(&mut self, name: &str) -> BuildQueryResult;
    fn finish(self) -> SQLQuery;

    // Provided method
    fn dialect(&self) -> Dialect { ... }
}
Expand description

Gratefully based on Diesel’s QueryBuilder trait: https://github.com/diesel-rs/diesel/blob/4885f61b8205f7f3c2cfa03837ed6714831abe6b/diesel/src/query_builder/mod.rs#L56

Required Methods§

Source

fn push_sql(&mut self, sql: &str)

Source

fn push_identifier(&mut self, identifier: &str) -> BuildQueryResult

Source

fn push_typed_value(&mut self, value: &TypedValue) -> BuildQueryResult

Source

fn push_bind_param(&mut self, name: &str) -> BuildQueryResult

Source

fn finish(self) -> SQLQuery

Provided Methods§

Source

fn dialect(&self) -> Dialect

The SQL dialect being generated. SQLite unless the builder was told otherwise; fragments branch on it only where DuckDB differs.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§