pub trait Expression {
type SqlType: TypedExpressionType;
}Expand description
Represents a typed fragment of SQL.
Apps should not need to implement this type directly, but it may be common
to use this in where clauses. Libraries should consider using
infix_operator! or
postfix_operator! instead of
implementing this directly.
Required Associated Types§
Sourcetype SqlType: TypedExpressionType
type SqlType: TypedExpressionType
The type that this expression represents in SQL
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl<T: Expression + ?Sized> Expression for &T
impl<T: Expression + ?Sized> Expression for &T
type SqlType = <T as Expression>::SqlType
Source§impl<T: Expression + ?Sized> Expression for Arc<T>
impl<T: Expression + ?Sized> Expression for Arc<T>
type SqlType = <T as Expression>::SqlType
Source§impl<T: Expression + ?Sized> Expression for Box<T>
impl<T: Expression + ?Sized> Expression for Box<T>
type SqlType = <T as Expression>::SqlType
Source§impl<T: Expression + ?Sized> Expression for Rc<T>
impl<T: Expression + ?Sized> Expression for Rc<T>
type SqlType = <T as Expression>::SqlType
Implementors§
Source§impl<L, R, ST> Expression for Concat<L, R>
impl<L, R, ST> Expression for Concat<L, R>
Source§impl<Query, Value> Expression for UncheckedBind<Query, Value>where
Query: Expression,
impl<Query, Value> Expression for UncheckedBind<Query, Value>where
Query: Expression,
type SqlType = <Query as Expression>::SqlType
Source§impl<S, C> Expression for AliasedField<S, C>
impl<S, C> Expression for AliasedField<S, C>
type SqlType = <C as Expression>::SqlType
Source§impl<ST, I> Expression for Many<ST, I>where
ST: TypedExpressionType,
Available on crate feature i-implement-a-third-party-backend-and-opt-into-breaking-changes only.
impl<ST, I> Expression for Many<ST, I>where
ST: TypedExpressionType,
Available on crate feature
i-implement-a-third-party-backend-and-opt-into-breaking-changes only.type SqlType = NotSelectable
Source§impl<ST, T> Expression for SqlLiteral<ST, T>where
ST: TypedExpressionType,
impl<ST, T> Expression for SqlLiteral<ST, T>where
ST: TypedExpressionType,
Source§impl<T, C> Expression for Collate<T, C>where
T: Expression,
impl<T, C> Expression for Collate<T, C>where
T: Expression,
type SqlType = <T as Expression>::SqlType
Source§impl<T, U> Expression for In<T, U>where
T: Expression,
U: InExpression<SqlType = T::SqlType>,
T::SqlType: SqlType,
IsSqlTypeNullable<T::SqlType>: MaybeNullableType<Bool>,
Available on crate feature i-implement-a-third-party-backend-and-opt-into-breaking-changes only.
impl<T, U> Expression for In<T, U>where
T: Expression,
U: InExpression<SqlType = T::SqlType>,
T::SqlType: SqlType,
IsSqlTypeNullable<T::SqlType>: MaybeNullableType<Bool>,
Available on crate feature
i-implement-a-third-party-backend-and-opt-into-breaking-changes only.type SqlType = <<<T as Expression>::SqlType as SqlType>::IsNull as MaybeNullableType<Bool>>::Out
Source§impl<T, U> Expression for NotIn<T, U>where
T: Expression,
U: InExpression<SqlType = T::SqlType>,
T::SqlType: SqlType,
IsSqlTypeNullable<T::SqlType>: MaybeNullableType<Bool>,
Available on crate feature i-implement-a-third-party-backend-and-opt-into-breaking-changes only.
impl<T, U> Expression for NotIn<T, U>where
T: Expression,
U: InExpression<SqlType = T::SqlType>,
T::SqlType: SqlType,
IsSqlTypeNullable<T::SqlType>: MaybeNullableType<Bool>,
Available on crate feature
i-implement-a-third-party-backend-and-opt-into-breaking-changes only.type SqlType = <<<T as Expression>::SqlType as SqlType>::IsNull as MaybeNullableType<Bool>>::Out
Source§impl<T> Expression for Exists<T>where
Subselect<T, Bool>: Expression,
Available on crate feature i-implement-a-third-party-backend-and-opt-into-breaking-changes only.
impl<T> Expression for Exists<T>where
Subselect<T, Bool>: Expression,
Available on crate feature
i-implement-a-third-party-backend-and-opt-into-breaking-changes only.