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

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

Implementors§