pub trait QueryFragment<DB: Backend, SP = NotSpecialized> {
    // Required method
    fn walk_ast<'b>(&'b self, pass: AstPass<'_, 'b, DB>) -> QueryResult<()>;

    // Provided methods
    fn to_sql(
        &self,
        out: &mut DB::QueryBuilder,
        backend: &DB
    ) -> QueryResult<()> { ... }
    fn collect_binds<'b>(
        &'b self,
        out: &mut DB::BindCollector<'b>,
        metadata_lookup: &mut DB::MetadataLookup,
        backend: &'b DB
    ) -> QueryResult<()> { ... }
    fn is_safe_to_cache_prepared(&self, backend: &DB) -> QueryResult<bool> { ... }
    fn is_noop(&self, backend: &DB) -> QueryResult<bool> { ... }
}
Expand description

An untyped fragment of SQL.

This may be a complete SQL command (such as an update statement without a RETURNING clause), or a subsection (such as our internal types used to represent a WHERE clause). Implementations of ExecuteDsl and LoadQuery will generally require that this trait be implemented.

Required Methods§

source

fn walk_ast<'b>(&'b self, pass: AstPass<'_, 'b, DB>) -> QueryResult<()>

Walk over this QueryFragment for all passes.

This method is where the actual behavior of an AST node is implemented. This method will contain the behavior required for all possible AST passes. See AstPass for more details.

Provided Methods§

source

fn to_sql(&self, out: &mut DB::QueryBuilder, backend: &DB) -> QueryResult<()>

Available on crate feature i-implement-a-third-party-backend-and-opt-into-breaking-changes only.

Converts this QueryFragment to its SQL representation.

This method should only be called by implementations of Connection.

source

fn collect_binds<'b>( &'b self, out: &mut DB::BindCollector<'b>, metadata_lookup: &mut DB::MetadataLookup, backend: &'b DB ) -> QueryResult<()>

Available on crate feature i-implement-a-third-party-backend-and-opt-into-breaking-changes only.

Serializes all bind parameters in this query.

A bind parameter is a value which is sent separately from the query itself. It is represented in SQL with a placeholder such as ? or $1.

This method should only be called by implementations of Connection.

source

fn is_safe_to_cache_prepared(&self, backend: &DB) -> QueryResult<bool>

Available on crate feature i-implement-a-third-party-backend-and-opt-into-breaking-changes only.

Is this query safe to store in the prepared statement cache?

In order to keep our prepared statement cache at a reasonable size, we avoid caching any queries which represent a potentially unbounded number of SQL queries. Generally this will only return true for queries for which to_sql will always construct exactly identical SQL.

Some examples of where this method will return false are:

  • SqlLiteral (We don’t know if the SQL was constructed dynamically, so we must assume that it was)
  • In and NotIn (Each value requires a separate bind param placeholder)

This method should only be called by implementations of Connection.

source

fn is_noop(&self, backend: &DB) -> QueryResult<bool>

Available on crate feature i-implement-a-third-party-backend-and-opt-into-breaking-changes only.

Does walking this AST have any effect?

Trait Implementations§

source§

impl<DB> QueryId for dyn QueryFragment<DB>

§

type QueryId = ()

A type which uniquely represents Self in a SQL query. Read more
source§

const HAS_STATIC_QUERY_ID: bool = false

Can the SQL generated by Self be uniquely identified by its type? Read more
source§

fn query_id() -> Option<TypeId>

Returns the type id of Self::QueryId if Self::HAS_STATIC_QUERY_ID. Returns None otherwise. Read more

Implementations on Foreign Types§

source§

impl<'a, T, DB> QueryFragment<DB> for &'a T
where DB: Backend, T: QueryFragment<DB> + ?Sized,

source§

fn walk_ast<'b>(&'b self, pass: AstPass<'_, 'b, DB>) -> QueryResult<()>

source§

impl<DB: Backend> QueryFragment<DB> for ()

source§

fn walk_ast<'b>(&'b self, _: AstPass<'_, 'b, DB>) -> QueryResult<()>

source§

impl<T0: QueryFragment<__DB>, T1: QueryFragment<__DB>, T2: QueryFragment<__DB>, T3: QueryFragment<__DB>, T4: QueryFragment<__DB>, T5: QueryFragment<__DB>, T6: QueryFragment<__DB>, T7: QueryFragment<__DB>, T8: QueryFragment<__DB>, T9: QueryFragment<__DB>, T10: QueryFragment<__DB>, T11: QueryFragment<__DB>, T12: QueryFragment<__DB>, T13: QueryFragment<__DB>, T14: QueryFragment<__DB>, T15: QueryFragment<__DB>, T16: QueryFragment<__DB>, T17: QueryFragment<__DB>, T18: QueryFragment<__DB>, T19: QueryFragment<__DB>, T20: QueryFragment<__DB>, T21: QueryFragment<__DB>, T22: QueryFragment<__DB>, T23: QueryFragment<__DB>, T24: QueryFragment<__DB>, T25: QueryFragment<__DB>, T26: QueryFragment<__DB>, T27: QueryFragment<__DB>, T28: QueryFragment<__DB>, T29: QueryFragment<__DB>, T30: QueryFragment<__DB>, T31: QueryFragment<__DB>, __DB: Backend> QueryFragment<__DB> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, T31)

source§

fn walk_ast<'b>(&'b self, out: AstPass<'_, 'b, __DB>) -> QueryResult<()>

source§

impl<T0: QueryFragment<__DB>, T1: QueryFragment<__DB>, T2: QueryFragment<__DB>, T3: QueryFragment<__DB>, T4: QueryFragment<__DB>, T5: QueryFragment<__DB>, T6: QueryFragment<__DB>, T7: QueryFragment<__DB>, T8: QueryFragment<__DB>, T9: QueryFragment<__DB>, T10: QueryFragment<__DB>, T11: QueryFragment<__DB>, T12: QueryFragment<__DB>, T13: QueryFragment<__DB>, T14: QueryFragment<__DB>, T15: QueryFragment<__DB>, T16: QueryFragment<__DB>, T17: QueryFragment<__DB>, T18: QueryFragment<__DB>, T19: QueryFragment<__DB>, T20: QueryFragment<__DB>, T21: QueryFragment<__DB>, T22: QueryFragment<__DB>, T23: QueryFragment<__DB>, T24: QueryFragment<__DB>, T25: QueryFragment<__DB>, T26: QueryFragment<__DB>, T27: QueryFragment<__DB>, T28: QueryFragment<__DB>, T29: QueryFragment<__DB>, T30: QueryFragment<__DB>, __DB: Backend> QueryFragment<__DB> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30)

source§

fn walk_ast<'b>(&'b self, out: AstPass<'_, 'b, __DB>) -> QueryResult<()>

source§

impl<T0: QueryFragment<__DB>, T1: QueryFragment<__DB>, T2: QueryFragment<__DB>, T3: QueryFragment<__DB>, T4: QueryFragment<__DB>, T5: QueryFragment<__DB>, T6: QueryFragment<__DB>, T7: QueryFragment<__DB>, T8: QueryFragment<__DB>, T9: QueryFragment<__DB>, T10: QueryFragment<__DB>, T11: QueryFragment<__DB>, T12: QueryFragment<__DB>, T13: QueryFragment<__DB>, T14: QueryFragment<__DB>, T15: QueryFragment<__DB>, T16: QueryFragment<__DB>, T17: QueryFragment<__DB>, T18: QueryFragment<__DB>, T19: QueryFragment<__DB>, T20: QueryFragment<__DB>, T21: QueryFragment<__DB>, T22: QueryFragment<__DB>, T23: QueryFragment<__DB>, T24: QueryFragment<__DB>, T25: QueryFragment<__DB>, T26: QueryFragment<__DB>, T27: QueryFragment<__DB>, T28: QueryFragment<__DB>, T29: QueryFragment<__DB>, __DB: Backend> QueryFragment<__DB> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29)

source§

fn walk_ast<'b>(&'b self, out: AstPass<'_, 'b, __DB>) -> QueryResult<()>

source§

impl<T0: QueryFragment<__DB>, T1: QueryFragment<__DB>, T2: QueryFragment<__DB>, T3: QueryFragment<__DB>, T4: QueryFragment<__DB>, T5: QueryFragment<__DB>, T6: QueryFragment<__DB>, T7: QueryFragment<__DB>, T8: QueryFragment<__DB>, T9: QueryFragment<__DB>, T10: QueryFragment<__DB>, T11: QueryFragment<__DB>, T12: QueryFragment<__DB>, T13: QueryFragment<__DB>, T14: QueryFragment<__DB>, T15: QueryFragment<__DB>, T16: QueryFragment<__DB>, T17: QueryFragment<__DB>, T18: QueryFragment<__DB>, T19: QueryFragment<__DB>, T20: QueryFragment<__DB>, T21: QueryFragment<__DB>, T22: QueryFragment<__DB>, T23: QueryFragment<__DB>, T24: QueryFragment<__DB>, T25: QueryFragment<__DB>, T26: QueryFragment<__DB>, T27: QueryFragment<__DB>, T28: QueryFragment<__DB>, __DB: Backend> QueryFragment<__DB> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28)

source§

fn walk_ast<'b>(&'b self, out: AstPass<'_, 'b, __DB>) -> QueryResult<()>

source§

impl<T0: QueryFragment<__DB>, T1: QueryFragment<__DB>, T2: QueryFragment<__DB>, T3: QueryFragment<__DB>, T4: QueryFragment<__DB>, T5: QueryFragment<__DB>, T6: QueryFragment<__DB>, T7: QueryFragment<__DB>, T8: QueryFragment<__DB>, T9: QueryFragment<__DB>, T10: QueryFragment<__DB>, T11: QueryFragment<__DB>, T12: QueryFragment<__DB>, T13: QueryFragment<__DB>, T14: QueryFragment<__DB>, T15: QueryFragment<__DB>, T16: QueryFragment<__DB>, T17: QueryFragment<__DB>, T18: QueryFragment<__DB>, T19: QueryFragment<__DB>, T20: QueryFragment<__DB>, T21: QueryFragment<__DB>, T22: QueryFragment<__DB>, T23: QueryFragment<__DB>, T24: QueryFragment<__DB>, T25: QueryFragment<__DB>, T26: QueryFragment<__DB>, T27: QueryFragment<__DB>, __DB: Backend> QueryFragment<__DB> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27)

source§

fn walk_ast<'b>(&'b self, out: AstPass<'_, 'b, __DB>) -> QueryResult<()>

source§

impl<T0: QueryFragment<__DB>, T1: QueryFragment<__DB>, T2: QueryFragment<__DB>, T3: QueryFragment<__DB>, T4: QueryFragment<__DB>, T5: QueryFragment<__DB>, T6: QueryFragment<__DB>, T7: QueryFragment<__DB>, T8: QueryFragment<__DB>, T9: QueryFragment<__DB>, T10: QueryFragment<__DB>, T11: QueryFragment<__DB>, T12: QueryFragment<__DB>, T13: QueryFragment<__DB>, T14: QueryFragment<__DB>, T15: QueryFragment<__DB>, T16: QueryFragment<__DB>, T17: QueryFragment<__DB>, T18: QueryFragment<__DB>, T19: QueryFragment<__DB>, T20: QueryFragment<__DB>, T21: QueryFragment<__DB>, T22: QueryFragment<__DB>, T23: QueryFragment<__DB>, T24: QueryFragment<__DB>, T25: QueryFragment<__DB>, T26: QueryFragment<__DB>, __DB: Backend> QueryFragment<__DB> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26)

source§

fn walk_ast<'b>(&'b self, out: AstPass<'_, 'b, __DB>) -> QueryResult<()>

source§

impl<T0: QueryFragment<__DB>, T1: QueryFragment<__DB>, T2: QueryFragment<__DB>, T3: QueryFragment<__DB>, T4: QueryFragment<__DB>, T5: QueryFragment<__DB>, T6: QueryFragment<__DB>, T7: QueryFragment<__DB>, T8: QueryFragment<__DB>, T9: QueryFragment<__DB>, T10: QueryFragment<__DB>, T11: QueryFragment<__DB>, T12: QueryFragment<__DB>, T13: QueryFragment<__DB>, T14: QueryFragment<__DB>, T15: QueryFragment<__DB>, T16: QueryFragment<__DB>, T17: QueryFragment<__DB>, T18: QueryFragment<__DB>, T19: QueryFragment<__DB>, T20: QueryFragment<__DB>, T21: QueryFragment<__DB>, T22: QueryFragment<__DB>, T23: QueryFragment<__DB>, T24: QueryFragment<__DB>, T25: QueryFragment<__DB>, __DB: Backend> QueryFragment<__DB> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25)

source§

fn walk_ast<'b>(&'b self, out: AstPass<'_, 'b, __DB>) -> QueryResult<()>

source§

impl<T0: QueryFragment<__DB>, T1: QueryFragment<__DB>, T2: QueryFragment<__DB>, T3: QueryFragment<__DB>, T4: QueryFragment<__DB>, T5: QueryFragment<__DB>, T6: QueryFragment<__DB>, T7: QueryFragment<__DB>, T8: QueryFragment<__DB>, T9: QueryFragment<__DB>, T10: QueryFragment<__DB>, T11: QueryFragment<__DB>, T12: QueryFragment<__DB>, T13: QueryFragment<__DB>, T14: QueryFragment<__DB>, T15: QueryFragment<__DB>, T16: QueryFragment<__DB>, T17: QueryFragment<__DB>, T18: QueryFragment<__DB>, T19: QueryFragment<__DB>, T20: QueryFragment<__DB>, T21: QueryFragment<__DB>, T22: QueryFragment<__DB>, T23: QueryFragment<__DB>, T24: QueryFragment<__DB>, __DB: Backend> QueryFragment<__DB> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24)

source§

fn walk_ast<'b>(&'b self, out: AstPass<'_, 'b, __DB>) -> QueryResult<()>

source§

impl<T0: QueryFragment<__DB>, T1: QueryFragment<__DB>, T2: QueryFragment<__DB>, T3: QueryFragment<__DB>, T4: QueryFragment<__DB>, T5: QueryFragment<__DB>, T6: QueryFragment<__DB>, T7: QueryFragment<__DB>, T8: QueryFragment<__DB>, T9: QueryFragment<__DB>, T10: QueryFragment<__DB>, T11: QueryFragment<__DB>, T12: QueryFragment<__DB>, T13: QueryFragment<__DB>, T14: QueryFragment<__DB>, T15: QueryFragment<__DB>, T16: QueryFragment<__DB>, T17: QueryFragment<__DB>, T18: QueryFragment<__DB>, T19: QueryFragment<__DB>, T20: QueryFragment<__DB>, T21: QueryFragment<__DB>, T22: QueryFragment<__DB>, T23: QueryFragment<__DB>, __DB: Backend> QueryFragment<__DB> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23)

source§

fn walk_ast<'b>(&'b self, out: AstPass<'_, 'b, __DB>) -> QueryResult<()>

source§

impl<T0: QueryFragment<__DB>, T1: QueryFragment<__DB>, T2: QueryFragment<__DB>, T3: QueryFragment<__DB>, T4: QueryFragment<__DB>, T5: QueryFragment<__DB>, T6: QueryFragment<__DB>, T7: QueryFragment<__DB>, T8: QueryFragment<__DB>, T9: QueryFragment<__DB>, T10: QueryFragment<__DB>, T11: QueryFragment<__DB>, T12: QueryFragment<__DB>, T13: QueryFragment<__DB>, T14: QueryFragment<__DB>, T15: QueryFragment<__DB>, T16: QueryFragment<__DB>, T17: QueryFragment<__DB>, T18: QueryFragment<__DB>, T19: QueryFragment<__DB>, T20: QueryFragment<__DB>, T21: QueryFragment<__DB>, T22: QueryFragment<__DB>, __DB: Backend> QueryFragment<__DB> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22)

source§

fn walk_ast<'b>(&'b self, out: AstPass<'_, 'b, __DB>) -> QueryResult<()>

source§

impl<T0: QueryFragment<__DB>, T1: QueryFragment<__DB>, T2: QueryFragment<__DB>, T3: QueryFragment<__DB>, T4: QueryFragment<__DB>, T5: QueryFragment<__DB>, T6: QueryFragment<__DB>, T7: QueryFragment<__DB>, T8: QueryFragment<__DB>, T9: QueryFragment<__DB>, T10: QueryFragment<__DB>, T11: QueryFragment<__DB>, T12: QueryFragment<__DB>, T13: QueryFragment<__DB>, T14: QueryFragment<__DB>, T15: QueryFragment<__DB>, T16: QueryFragment<__DB>, T17: QueryFragment<__DB>, T18: QueryFragment<__DB>, T19: QueryFragment<__DB>, T20: QueryFragment<__DB>, T21: QueryFragment<__DB>, __DB: Backend> QueryFragment<__DB> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21)

source§

fn walk_ast<'b>(&'b self, out: AstPass<'_, 'b, __DB>) -> QueryResult<()>

source§

impl<T0: QueryFragment<__DB>, T1: QueryFragment<__DB>, T2: QueryFragment<__DB>, T3: QueryFragment<__DB>, T4: QueryFragment<__DB>, T5: QueryFragment<__DB>, T6: QueryFragment<__DB>, T7: QueryFragment<__DB>, T8: QueryFragment<__DB>, T9: QueryFragment<__DB>, T10: QueryFragment<__DB>, T11: QueryFragment<__DB>, T12: QueryFragment<__DB>, T13: QueryFragment<__DB>, T14: QueryFragment<__DB>, T15: QueryFragment<__DB>, T16: QueryFragment<__DB>, T17: QueryFragment<__DB>, T18: QueryFragment<__DB>, T19: QueryFragment<__DB>, T20: QueryFragment<__DB>, __DB: Backend> QueryFragment<__DB> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20)

source§

fn walk_ast<'b>(&'b self, out: AstPass<'_, 'b, __DB>) -> QueryResult<()>

source§

impl<T0: QueryFragment<__DB>, T1: QueryFragment<__DB>, T2: QueryFragment<__DB>, T3: QueryFragment<__DB>, T4: QueryFragment<__DB>, T5: QueryFragment<__DB>, T6: QueryFragment<__DB>, T7: QueryFragment<__DB>, T8: QueryFragment<__DB>, T9: QueryFragment<__DB>, T10: QueryFragment<__DB>, T11: QueryFragment<__DB>, T12: QueryFragment<__DB>, T13: QueryFragment<__DB>, T14: QueryFragment<__DB>, T15: QueryFragment<__DB>, T16: QueryFragment<__DB>, T17: QueryFragment<__DB>, T18: QueryFragment<__DB>, T19: QueryFragment<__DB>, __DB: Backend> QueryFragment<__DB> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19)

source§

fn walk_ast<'b>(&'b self, out: AstPass<'_, 'b, __DB>) -> QueryResult<()>

source§

impl<T0: QueryFragment<__DB>, T1: QueryFragment<__DB>, T2: QueryFragment<__DB>, T3: QueryFragment<__DB>, T4: QueryFragment<__DB>, T5: QueryFragment<__DB>, T6: QueryFragment<__DB>, T7: QueryFragment<__DB>, T8: QueryFragment<__DB>, T9: QueryFragment<__DB>, T10: QueryFragment<__DB>, T11: QueryFragment<__DB>, T12: QueryFragment<__DB>, T13: QueryFragment<__DB>, T14: QueryFragment<__DB>, T15: QueryFragment<__DB>, T16: QueryFragment<__DB>, T17: QueryFragment<__DB>, T18: QueryFragment<__DB>, __DB: Backend> QueryFragment<__DB> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18)

source§

fn walk_ast<'b>(&'b self, out: AstPass<'_, 'b, __DB>) -> QueryResult<()>

source§

impl<T0: QueryFragment<__DB>, T1: QueryFragment<__DB>, T2: QueryFragment<__DB>, T3: QueryFragment<__DB>, T4: QueryFragment<__DB>, T5: QueryFragment<__DB>, T6: QueryFragment<__DB>, T7: QueryFragment<__DB>, T8: QueryFragment<__DB>, T9: QueryFragment<__DB>, T10: QueryFragment<__DB>, T11: QueryFragment<__DB>, T12: QueryFragment<__DB>, T13: QueryFragment<__DB>, T14: QueryFragment<__DB>, T15: QueryFragment<__DB>, T16: QueryFragment<__DB>, T17: QueryFragment<__DB>, __DB: Backend> QueryFragment<__DB> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17)

source§

fn walk_ast<'b>(&'b self, out: AstPass<'_, 'b, __DB>) -> QueryResult<()>

source§

impl<T0: QueryFragment<__DB>, T1: QueryFragment<__DB>, T2: QueryFragment<__DB>, T3: QueryFragment<__DB>, T4: QueryFragment<__DB>, T5: QueryFragment<__DB>, T6: QueryFragment<__DB>, T7: QueryFragment<__DB>, T8: QueryFragment<__DB>, T9: QueryFragment<__DB>, T10: QueryFragment<__DB>, T11: QueryFragment<__DB>, T12: QueryFragment<__DB>, T13: QueryFragment<__DB>, T14: QueryFragment<__DB>, T15: QueryFragment<__DB>, T16: QueryFragment<__DB>, __DB: Backend> QueryFragment<__DB> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16)

source§

fn walk_ast<'b>(&'b self, out: AstPass<'_, 'b, __DB>) -> QueryResult<()>

source§

impl<T0: QueryFragment<__DB>, T1: QueryFragment<__DB>, T2: QueryFragment<__DB>, T3: QueryFragment<__DB>, T4: QueryFragment<__DB>, T5: QueryFragment<__DB>, T6: QueryFragment<__DB>, T7: QueryFragment<__DB>, T8: QueryFragment<__DB>, T9: QueryFragment<__DB>, T10: QueryFragment<__DB>, T11: QueryFragment<__DB>, T12: QueryFragment<__DB>, T13: QueryFragment<__DB>, T14: QueryFragment<__DB>, T15: QueryFragment<__DB>, __DB: Backend> QueryFragment<__DB> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)

source§

fn walk_ast<'b>(&'b self, out: AstPass<'_, 'b, __DB>) -> QueryResult<()>

source§

impl<T0: QueryFragment<__DB>, T1: QueryFragment<__DB>, T2: QueryFragment<__DB>, T3: QueryFragment<__DB>, T4: QueryFragment<__DB>, T5: QueryFragment<__DB>, T6: QueryFragment<__DB>, T7: QueryFragment<__DB>, T8: QueryFragment<__DB>, T9: QueryFragment<__DB>, T10: QueryFragment<__DB>, T11: QueryFragment<__DB>, T12: QueryFragment<__DB>, T13: QueryFragment<__DB>, T14: QueryFragment<__DB>, __DB: Backend> QueryFragment<__DB> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14)

source§

fn walk_ast<'b>(&'b self, out: AstPass<'_, 'b, __DB>) -> QueryResult<()>

source§

impl<T0: QueryFragment<__DB>, T1: QueryFragment<__DB>, T2: QueryFragment<__DB>, T3: QueryFragment<__DB>, T4: QueryFragment<__DB>, T5: QueryFragment<__DB>, T6: QueryFragment<__DB>, T7: QueryFragment<__DB>, T8: QueryFragment<__DB>, T9: QueryFragment<__DB>, T10: QueryFragment<__DB>, T11: QueryFragment<__DB>, T12: QueryFragment<__DB>, T13: QueryFragment<__DB>, __DB: Backend> QueryFragment<__DB> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)

source§

fn walk_ast<'b>(&'b self, out: AstPass<'_, 'b, __DB>) -> QueryResult<()>

source§

impl<T0: QueryFragment<__DB>, T1: QueryFragment<__DB>, T2: QueryFragment<__DB>, T3: QueryFragment<__DB>, T4: QueryFragment<__DB>, T5: QueryFragment<__DB>, T6: QueryFragment<__DB>, T7: QueryFragment<__DB>, T8: QueryFragment<__DB>, T9: QueryFragment<__DB>, T10: QueryFragment<__DB>, T11: QueryFragment<__DB>, T12: QueryFragment<__DB>, __DB: Backend> QueryFragment<__DB> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)

source§

fn walk_ast<'b>(&'b self, out: AstPass<'_, 'b, __DB>) -> QueryResult<()>

source§

impl<T0: QueryFragment<__DB>, T1: QueryFragment<__DB>, T2: QueryFragment<__DB>, T3: QueryFragment<__DB>, T4: QueryFragment<__DB>, T5: QueryFragment<__DB>, T6: QueryFragment<__DB>, T7: QueryFragment<__DB>, T8: QueryFragment<__DB>, T9: QueryFragment<__DB>, T10: QueryFragment<__DB>, T11: QueryFragment<__DB>, __DB: Backend> QueryFragment<__DB> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)

source§

fn walk_ast<'b>(&'b self, out: AstPass<'_, 'b, __DB>) -> QueryResult<()>

source§

impl<T0: QueryFragment<__DB>, T1: QueryFragment<__DB>, T2: QueryFragment<__DB>, T3: QueryFragment<__DB>, T4: QueryFragment<__DB>, T5: QueryFragment<__DB>, T6: QueryFragment<__DB>, T7: QueryFragment<__DB>, T8: QueryFragment<__DB>, T9: QueryFragment<__DB>, T10: QueryFragment<__DB>, __DB: Backend> QueryFragment<__DB> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)

source§

fn walk_ast<'b>(&'b self, out: AstPass<'_, 'b, __DB>) -> QueryResult<()>

source§

impl<T0: QueryFragment<__DB>, T1: QueryFragment<__DB>, T2: QueryFragment<__DB>, T3: QueryFragment<__DB>, T4: QueryFragment<__DB>, T5: QueryFragment<__DB>, T6: QueryFragment<__DB>, T7: QueryFragment<__DB>, T8: QueryFragment<__DB>, T9: QueryFragment<__DB>, __DB: Backend> QueryFragment<__DB> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)

source§

fn walk_ast<'b>(&'b self, out: AstPass<'_, 'b, __DB>) -> QueryResult<()>

source§

impl<T0: QueryFragment<__DB>, T1: QueryFragment<__DB>, T2: QueryFragment<__DB>, T3: QueryFragment<__DB>, T4: QueryFragment<__DB>, T5: QueryFragment<__DB>, T6: QueryFragment<__DB>, T7: QueryFragment<__DB>, T8: QueryFragment<__DB>, __DB: Backend> QueryFragment<__DB> for (T0, T1, T2, T3, T4, T5, T6, T7, T8)

source§

fn walk_ast<'b>(&'b self, out: AstPass<'_, 'b, __DB>) -> QueryResult<()>

source§

impl<T0: QueryFragment<__DB>, T1: QueryFragment<__DB>, T2: QueryFragment<__DB>, T3: QueryFragment<__DB>, T4: QueryFragment<__DB>, T5: QueryFragment<__DB>, T6: QueryFragment<__DB>, T7: QueryFragment<__DB>, __DB: Backend> QueryFragment<__DB> for (T0, T1, T2, T3, T4, T5, T6, T7)

source§

fn walk_ast<'b>(&'b self, out: AstPass<'_, 'b, __DB>) -> QueryResult<()>

source§

impl<T0: QueryFragment<__DB>, T1: QueryFragment<__DB>, T2: QueryFragment<__DB>, T3: QueryFragment<__DB>, T4: QueryFragment<__DB>, T5: QueryFragment<__DB>, T6: QueryFragment<__DB>, __DB: Backend> QueryFragment<__DB> for (T0, T1, T2, T3, T4, T5, T6)

source§

fn walk_ast<'b>(&'b self, out: AstPass<'_, 'b, __DB>) -> QueryResult<()>

source§

impl<T0: QueryFragment<__DB>, T1: QueryFragment<__DB>, T2: QueryFragment<__DB>, T3: QueryFragment<__DB>, T4: QueryFragment<__DB>, T5: QueryFragment<__DB>, __DB: Backend> QueryFragment<__DB> for (T0, T1, T2, T3, T4, T5)

source§

fn walk_ast<'b>(&'b self, out: AstPass<'_, 'b, __DB>) -> QueryResult<()>

source§

impl<T0: QueryFragment<__DB>, T1: QueryFragment<__DB>, T2: QueryFragment<__DB>, T3: QueryFragment<__DB>, T4: QueryFragment<__DB>, __DB: Backend> QueryFragment<__DB> for (T0, T1, T2, T3, T4)

source§

fn walk_ast<'b>(&'b self, out: AstPass<'_, 'b, __DB>) -> QueryResult<()>

source§

impl<T0: QueryFragment<__DB>, T1: QueryFragment<__DB>, T2: QueryFragment<__DB>, T3: QueryFragment<__DB>, __DB: Backend> QueryFragment<__DB> for (T0, T1, T2, T3)

source§

fn walk_ast<'b>(&'b self, out: AstPass<'_, 'b, __DB>) -> QueryResult<()>

source§

impl<T0: QueryFragment<__DB>, T1: QueryFragment<__DB>, T2: QueryFragment<__DB>, __DB: Backend> QueryFragment<__DB> for (T0, T1, T2)

source§

fn walk_ast<'b>(&'b self, out: AstPass<'_, 'b, __DB>) -> QueryResult<()>

source§

impl<T0: QueryFragment<__DB>, T1: QueryFragment<__DB>, __DB: Backend> QueryFragment<__DB> for (T0, T1)

source§

fn walk_ast<'b>(&'b self, out: AstPass<'_, 'b, __DB>) -> QueryResult<()>

source§

impl<T0: QueryFragment<__DB>, __DB: Backend> QueryFragment<__DB> for (T0,)

source§

fn walk_ast<'b>(&'b self, out: AstPass<'_, 'b, __DB>) -> QueryResult<()>

source§

impl<T, DB> QueryFragment<DB> for Option<T>
where DB: Backend, T: QueryFragment<DB>,

source§

fn walk_ast<'b>(&'b self, out: AstPass<'_, 'b, DB>) -> QueryResult<()>

source§

impl<T, DB> QueryFragment<DB> for Box<T>
where DB: Backend, T: QueryFragment<DB> + ?Sized,

source§

fn walk_ast<'b>(&'b self, pass: AstPass<'_, 'b, DB>) -> QueryResult<()>

Implementors§

source§

impl QueryFragment<Mysql> for LimitOffsetClause<NoLimitClause, NoOffsetClause>

Available on crate feature mysql_backend only.
source§

impl QueryFragment<Sqlite> for LimitOffsetClause<NoLimitClause, NoOffsetClause>

Available on crate feature sqlite only.
source§

impl<'a> QueryFragment<Mysql> for BoxedLimitOffsetClause<'a, Mysql>

Available on crate feature mysql_backend only.
source§

impl<'a> QueryFragment<Pg> for BoxedLimitOffsetClause<'a, Pg>

Available on crate feature postgres_backend only.
source§

impl<'a> QueryFragment<Sqlite> for BoxedLimitOffsetClause<'a, Sqlite>

Available on crate feature sqlite only.
source§

impl<'a, C> QueryFragment<Pg> for TransactionBuilder<'a, C>

Available on crate feature postgres_backend only.
source§

impl<'a, ST, QS, DB, GB> QueryFragment<DB> for BoxedSelectStatement<'a, ST, QS, DB, GB>
where DB: Backend, Self: QueryFragment<DB, DB::SelectStatementSyntax>,

source§

impl<'a, ST, QS, DB, GB> QueryFragment<DB, AnsiSqlSelectStatement> for BoxedSelectStatement<'a, ST, QS, DB, GB>

source§

impl<DB> QueryFragment<DB> for NoFromClause
where Self: QueryFragment<DB, DB::EmptyFromClauseSyntax>, DB: Backend,

source§

impl<DB> QueryFragment<DB> for NoLimitClause

source§

impl<DB> QueryFragment<DB> for NoOffsetClause

source§

impl<DB> QueryFragment<DB, AnsiSqlFromClauseSyntax> for NoFromClause
where DB: Backend<EmptyFromClauseSyntax = AnsiSqlFromClauseSyntax>,

source§

impl<DB, Inner> QueryFragment<DB> for SqlQuery<Inner>

source§

impl<DB, Query> QueryFragment<DB> for BoxedSqlQuery<'_, DB, Query>

source§

impl<DB: Backend> QueryFragment<DB> for now

source§

impl<DB: Backend> QueryFragment<DB> for today

source§

impl<Expr, DB> QueryFragment<DB> for LimitClause<Expr>

source§

impl<Expr, DB> QueryFragment<DB> for OffsetClause<Expr>

source§

impl<Expr, DB> QueryFragment<DB> for ReturningClause<Expr>
where DB: Backend, Self: QueryFragment<DB, DB::ReturningClause>,

source§

impl<Expr, DB> QueryFragment<DB, PgLikeReturningClause> for ReturningClause<Expr>
where DB: Backend<ReturningClause = PgLikeReturningClause>, Expr: QueryFragment<DB>,

source§

impl<F, S, D, W, O, LOf, G, H, LC, DB> QueryFragment<DB> for SelectStatement<F, S, D, W, O, LOf, G, H, LC>
where DB: Backend, Self: QueryFragment<DB, DB::SelectStatementSyntax>,

source§

impl<F, S, D, W, O, LOf, G, H, LC, DB> QueryFragment<DB, AnsiSqlSelectStatement> for SelectStatement<F, S, D, W, O, LOf, G, H, LC>
where DB: Backend<SelectStatementSyntax = AnsiSqlSelectStatement>, S: QueryFragment<DB>, F: QueryFragment<DB>, D: QueryFragment<DB>, W: QueryFragment<DB>, O: QueryFragment<DB>, LOf: QueryFragment<DB>, G: QueryFragment<DB>, H: QueryFragment<DB>, LC: QueryFragment<DB>,

source§

impl<L> QueryFragment<Mysql> for LimitOffsetClause<LimitClause<L>, NoOffsetClause>

Available on crate feature mysql_backend only.
source§

impl<L> QueryFragment<Sqlite> for LimitOffsetClause<LimitClause<L>, NoOffsetClause>

Available on crate feature sqlite only.
source§

impl<L, O> QueryFragment<Mysql> for LimitOffsetClause<LimitClause<L>, OffsetClause<O>>

Available on crate feature mysql_backend only.
source§

impl<L, O> QueryFragment<Pg> for LimitOffsetClause<L, O>

Available on crate feature postgres_backend only.
source§

impl<L, O> QueryFragment<Sqlite> for LimitOffsetClause<LimitClause<L>, OffsetClause<O>>

Available on crate feature sqlite only.
source§

impl<L, R, DB> QueryFragment<DB> for Concat<L, R>
where DB: Backend, Self: QueryFragment<DB, DB::ConcatClause>,

source§

impl<L, R, DB> QueryFragment<DB, ConcatWithPipesClause> for Concat<L, R>
where L: QueryFragment<DB>, R: QueryFragment<DB>, DB: Backend + SqlDialect<ConcatClause = ConcatWithPipesClause>,

source§

impl<O> QueryFragment<Sqlite> for LimitOffsetClause<NoLimitClause, OffsetClause<O>>

Available on crate feature sqlite only.
source§

impl<Query, Value, DB> QueryFragment<DB> for UncheckedBind<Query, Value>
where DB: Backend, Query: QueryFragment<DB>, Value: QueryFragment<DB>,

source§

impl<S> QueryFragment<Pg> for Only<S>
where S: QueryFragment<Pg>,

Available on crate feature postgres_backend only.
source§

impl<S, C, DB> QueryFragment<DB> for AliasedField<S, C>
where S: AliasSource, DB: Backend, C: Column<Table = S::Target>,

source§

impl<S, DB> QueryFragment<DB> for Alias<S>
where S: AliasSource, DB: Backend, Self: QueryFragment<DB, DB::AliasSyntax>,

source§

impl<S, DB> QueryFragment<DB, AsAliasSyntax> for Alias<S>
where S: AliasSource, DB: Backend, S::Target: QueryFragment<DB>,

source§

impl<ST, I, DB> QueryFragment<DB> for Many<ST, I>
where Self: QueryFragment<DB, DB::ArrayComparison>, DB: Backend,

Available on crate feature i-implement-a-third-party-backend-and-opt-into-breaking-changes only.
source§

impl<ST, I, DB> QueryFragment<DB, AnsiSqlArrayComparison> for Many<ST, I>
where DB: Backend + HasSqlType<ST> + SqlDialect<ArrayComparison = AnsiSqlArrayComparison>, ST: SingleValue, I: ToSql<ST, DB>,

Available on crate feature i-implement-a-third-party-backend-and-opt-into-breaking-changes only.
source§

impl<ST, T, DB> QueryFragment<DB> for SqlLiteral<ST, T>
where DB: Backend, T: QueryFragment<DB>,

source§

impl<T> QueryFragment<Pg> for DistinctOnClause<T>
where T: QueryFragment<Pg>,

Available on crate feature postgres_backend only.
source§

impl<T, DB> QueryFragment<DB> for Exists<T>
where DB: Backend, Self: QueryFragment<DB, DB::ExistsSyntax>,

Available on crate feature i-implement-a-third-party-backend-and-opt-into-breaking-changes only.
source§

impl<T, DB> QueryFragment<DB, AnsiSqlExistsSyntax> for Exists<T>
where DB: Backend + SqlDialect<ExistsSyntax = AnsiSqlExistsSyntax>, T: QueryFragment<DB>,

Available on crate feature i-implement-a-third-party-backend-and-opt-into-breaking-changes only.
source§

impl<T, Tab, DB> QueryFragment<DB> for ValuesClause<T, Tab>
where DB: Backend, Tab: Table, T: InsertValues<Tab, DB>, DefaultValues: QueryFragment<DB>,

source§

impl<T, U, DB> QueryFragment<DB> for In<T, U>
where DB: Backend, Self: QueryFragment<DB, DB::ArrayComparison>,

Available on crate feature i-implement-a-third-party-backend-and-opt-into-breaking-changes only.
source§

impl<T, U, DB> QueryFragment<DB> for NotIn<T, U>
where DB: Backend, Self: QueryFragment<DB, DB::ArrayComparison>,

Available on crate feature i-implement-a-third-party-backend-and-opt-into-breaking-changes only.
source§

impl<T, U, DB> QueryFragment<DB, AnsiSqlArrayComparison> for In<T, U>
where DB: Backend + SqlDialect<ArrayComparison = AnsiSqlArrayComparison>, T: QueryFragment<DB>, U: QueryFragment<DB> + MaybeEmpty,

Available on crate feature i-implement-a-third-party-backend-and-opt-into-breaking-changes only.
source§

impl<T, U, DB> QueryFragment<DB, AnsiSqlArrayComparison> for NotIn<T, U>
where DB: Backend + SqlDialect<ArrayComparison = AnsiSqlArrayComparison>, T: QueryFragment<DB>, U: QueryFragment<DB> + MaybeEmpty,

Available on crate feature i-implement-a-third-party-backend-and-opt-into-breaking-changes only.
source§

impl<T, U, Op, Ret, DB> QueryFragment<DB> for InsertStatement<T, U, Op, Ret>
where DB: Backend + DieselReserveSpecialization, T: Table, T::FromClause: QueryFragment<DB>, U: QueryFragment<DB> + CanInsertInSingleQuery<DB>, Op: QueryFragment<DB>, Ret: QueryFragment<DB>,

source§

impl<T, U, Ret, DB> QueryFragment<DB> for DeleteStatement<T, U, Ret>

source§

impl<T, U, V, Ret, DB> QueryFragment<DB> for UpdateStatement<T, U, V, Ret>

source§

impl<Tab, DB, V, QId, const HAS_STATIC_QUERY_ID: bool> QueryFragment<DB> for BatchInsert<V, Tab, QId, HAS_STATIC_QUERY_ID>
where DB: Backend, Self: QueryFragment<DB, DB::BatchInsertSupport>,

source§

impl<Tab, DB, V, QId, const HAS_STATIC_QUERY_ID: bool> QueryFragment<DB, PostgresLikeBatchInsertSupport> for BatchInsert<Vec<ValuesClause<V, Tab>>, Tab, QId, HAS_STATIC_QUERY_ID>

source§

impl<Whens, E, DB> QueryFragment<DB> for CaseWhen<Whens, E>
where DB: Backend, Whens: QueryFragment<DB>, E: QueryFragment<DB>,