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; }
Apps should not need to concern themselves with this trait.
This is the trait used to actually construct a SQL query. You will take one
of these as an argument if you're implementing
QueryFragment
manually.
Required Methods
fn push_sql(&mut self, sql: &str)
Add sql
to the end of the query being constructed.
fn push_identifier(&mut self, identifier: &str) -> QueryResult<()>
Quote identifier
, and add it to the end of the query being
constructed.
fn push_bind_param(&mut self)
Add a placeholder for a bind parameter to the end of the query being constructed.
fn finish(self) -> String
Returns the constructed SQL query.
Implementors
impl QueryBuilder<Mysql> for MysqlQueryBuilder
impl QueryBuilder<Pg> for PgQueryBuilder
impl QueryBuilder<Sqlite> for SqliteQueryBuilder