pub trait ColumnTrait: IdenStatic + Iterable {
const TABLE: &'static str;
Show 30 methods
// Required method
fn def(&self) -> ColumnDef;
// Provided methods
fn as_column_ref(&self) -> ColumnRef { ... }
fn into_expr(self) -> Expr { ... }
fn eq<V: Into<Value>>(&self, v: V) -> Expr { ... }
fn ne<V: Into<Value>>(&self, v: V) -> Expr { ... }
fn gt<V: Into<Value>>(&self, v: V) -> Expr { ... }
fn gte<V: Into<Value>>(&self, v: V) -> Expr { ... }
fn lt<V: Into<Value>>(&self, v: V) -> Expr { ... }
fn lte<V: Into<Value>>(&self, v: V) -> Expr { ... }
fn between<V: Into<Value>>(&self, a: V, b: V) -> Expr { ... }
fn not_between<V: Into<Value>>(&self, a: V, b: V) -> Expr { ... }
fn like(&self, pattern: &str) -> Expr { ... }
fn not_like(&self, pattern: &str) -> Expr { ... }
fn starts_with(&self, s: &str) -> Expr { ... }
fn ends_with(&self, s: &str) -> Expr { ... }
fn contains(&self, s: &str) -> Expr { ... }
fn is_null(&self) -> Expr { ... }
fn is_not_null(&self) -> Expr { ... }
fn is_in<V: Into<Value>, I: IntoIterator<Item = V>>(
&self,
values: I,
) -> Expr { ... }
fn is_not_in<V: Into<Value>, I: IntoIterator<Item = V>>(
&self,
values: I,
) -> Expr { ... }
fn in_subquery(&self, select: Select) -> Expr { ... }
fn not_in_subquery(&self, select: Select) -> Expr { ... }
fn eq_col<C: ColumnTrait>(&self, other: C) -> Expr { ... }
fn matches(&self, query: &str) -> Expr { ... }
fn if_null<V: Into<Value>>(&self, v: V) -> Expr { ... }
fn max(&self) -> Expr { ... }
fn min(&self) -> Expr { ... }
fn sum(&self) -> Expr { ... }
fn count(&self) -> Expr { ... }
fn avg(&self) -> Expr { ... }
}Expand description
A column of an entity, derived on the Column enum.
Provides the condition builders: Column::Name.eq("x"),
Column::Age.gt(18) and so on. Every builder renders the column as
table.column, so conditions stay unambiguous after a join.
Required Associated Constants§
Required Methods§
Provided Methods§
Sourcefn as_column_ref(&self) -> ColumnRef
fn as_column_ref(&self) -> ColumnRef
The column as a qualified table.column reference.
Sourcefn not_between<V: Into<Value>>(&self, a: V, b: V) -> Expr
fn not_between<V: Into<Value>>(&self, a: V, b: V) -> Expr
Builds col NOT BETWEEN a AND b.
Sourcefn starts_with(&self, s: &str) -> Expr
fn starts_with(&self, s: &str) -> Expr
Builds col LIKE 's%'.
Sourcefn is_not_null(&self) -> Expr
fn is_not_null(&self) -> Expr
Builds col IS NOT NULL.
Sourcefn is_in<V: Into<Value>, I: IntoIterator<Item = V>>(&self, values: I) -> Expr
fn is_in<V: Into<Value>, I: IntoIterator<Item = V>>(&self, values: I) -> Expr
Builds col IN (values).
Sourcefn is_not_in<V: Into<Value>, I: IntoIterator<Item = V>>(
&self,
values: I,
) -> Expr
fn is_not_in<V: Into<Value>, I: IntoIterator<Item = V>>( &self, values: I, ) -> Expr
Builds col NOT IN (values).
Sourcefn in_subquery(&self, select: Select) -> Expr
fn in_subquery(&self, select: Select) -> Expr
Builds col IN (subquery).
Sourcefn not_in_subquery(&self, select: Select) -> Expr
fn not_in_subquery(&self, select: Select) -> Expr
Builds col NOT IN (subquery).
Sourcefn eq_col<C: ColumnTrait>(&self, other: C) -> Expr
fn eq_col<C: ColumnTrait>(&self, other: C) -> Expr
Builds col = other.col, comparing two columns rather than a column
and a value, for example across a join.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".