Trait diesel::query_builder::QueryBuilder[][src]

pub trait QueryBuilder<DB: Backend> {
    fn push_sql(&mut self, sql: &str);
fn push_identifier(&mut self, identifier: &str) -> QueryResult<()>;
fn push_bind_param(&mut self);
fn finish(self) -> String; fn push_bind_param_value_only(&mut self) { ... } }

Constructs a SQL query from a Diesel AST.

The only reason you should ever need to interact with this trait is if you are extending Diesel with support for a new backend. Plugins which extend the query builder with new capabilities will interact with AstPass instead.

Required methods

fn push_sql(&mut self, sql: &str)[src]

Add sql to the end of the query being constructed.

fn push_identifier(&mut self, identifier: &str) -> QueryResult<()>[src]

Quote identifier, and add it to the end of the query being constructed.

fn push_bind_param(&mut self)[src]

Add a placeholder for a bind parameter to the end of the query being constructed.

fn finish(self) -> String[src]

Returns the constructed SQL query.

Loading content...

Provided methods

fn push_bind_param_value_only(&mut self)[src]

Increases the internal counter for bind parameters without adding the bind parameter itself to the query

Loading content...


impl QueryBuilder<Mysql> for MysqlQueryBuilder[src]

impl QueryBuilder<Pg> for PgQueryBuilder[src]

impl QueryBuilder<Sqlite> for SqliteQueryBuilder[src]

Loading content...