pub trait Query<S>: Sized {
type SqlPart;
type Context1: Default;
type Context2: Default;
type Output;
// Required methods
fn build_sql_part_back(
ctx: &mut Self::Context2,
from: Self::SqlPart,
) -> String;
fn build_query(
ctx1: Self::Context1,
f: impl FnOnce(&mut Self::Context2) -> String,
) -> (String, Self::Output);
// Provided methods
fn handle_where_item<T>(t: T, ctx: &mut Self::Context1) -> Self::SqlPart
where T: WhereItem<S, Self> + 'static { ... }
fn handle_accept<T>(t: T, ctx: &mut Self::Context1) -> Self::SqlPart
where AcceptToSqlPart<T>: ToSqlPart<Self, S> { ... }
}
Required Associated Types§
Required Methods§
fn build_sql_part_back(ctx: &mut Self::Context2, from: Self::SqlPart) -> String
fn build_query( ctx1: Self::Context1, f: impl FnOnce(&mut Self::Context2) -> String, ) -> (String, Self::Output)
Provided Methods§
fn handle_where_item<T>(t: T, ctx: &mut Self::Context1) -> Self::SqlPartwhere
T: WhereItem<S, Self> + 'static,
👎Deprecated: in favor of ToSqlPart
fn handle_accept<T>(t: T, ctx: &mut Self::Context1) -> Self::SqlPartwhere
AcceptToSqlPart<T>: ToSqlPart<Self, S>,
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.