pub struct Column { /* private fields */ }Expand description
A column reference for building expressions.
Implementations§
Source§impl Column
impl Column
Sourcepub fn new_simple(name: &str) -> Self
pub fn new_simple(name: &str) -> Self
Creates a simple column reference without table name. If the name contains a dot (e.g., “orders.year”), it will be parsed as table.column.
Sourcepub fn with_index(self, index: usize) -> Self
pub fn with_index(self, index: usize) -> Self
Sets the column index.
Sourcepub fn table_name(&self) -> Option<String>
pub fn table_name(&self) -> Option<String>
Returns the table name if set.
Sourcepub fn gte(&self, value: &JsValue) -> Expr
pub fn gte(&self, value: &JsValue) -> Expr
Creates a greater-than-or-equal expression: column >= value
Sourcepub fn lte(&self, value: &JsValue) -> Expr
pub fn lte(&self, value: &JsValue) -> Expr
Creates a less-than-or-equal expression: column <= value
Sourcepub fn between(&self, low: &JsValue, high: &JsValue) -> Expr
pub fn between(&self, low: &JsValue, high: &JsValue) -> Expr
Creates a BETWEEN expression: column BETWEEN low AND high
Sourcepub fn not_between(&self, low: &JsValue, high: &JsValue) -> Expr
pub fn not_between(&self, low: &JsValue, high: &JsValue) -> Expr
Creates a NOT BETWEEN expression: column NOT BETWEEN low AND high
Sourcepub fn not_in(&self, values: &JsValue) -> Expr
pub fn not_in(&self, values: &JsValue) -> Expr
Creates a NOT IN expression: column NOT IN (values)
Sourcepub fn not_like(&self, pattern: &str) -> Expr
pub fn not_like(&self, pattern: &str) -> Expr
Creates a NOT LIKE expression: column NOT LIKE pattern
Sourcepub fn regex_match(&self, pattern: &str) -> Expr
pub fn regex_match(&self, pattern: &str) -> Expr
Creates a MATCH (regex) expression: column MATCH pattern
Sourcepub fn not_regex_match(&self, pattern: &str) -> Expr
pub fn not_regex_match(&self, pattern: &str) -> Expr
Creates a NOT MATCH (regex) expression: column NOT MATCH pattern
Sourcepub fn is_not_null(&self) -> Expr
pub fn is_not_null(&self) -> Expr
Creates an IS NOT NULL expression
Sourcepub fn get(&self, path: &str) -> JsonbColumn
pub fn get(&self, path: &str) -> JsonbColumn
Creates a JSONB path access expression
Trait Implementations§
Source§impl FromWasmAbi for Column
impl FromWasmAbi for Column
Source§impl IntoWasmAbi for Column
impl IntoWasmAbi for Column
Source§impl LongRefFromWasmAbi for Column
impl LongRefFromWasmAbi for Column
Source§impl OptionFromWasmAbi for Column
impl OptionFromWasmAbi for Column
Source§impl OptionIntoWasmAbi for Column
impl OptionIntoWasmAbi for Column
Source§impl RefFromWasmAbi for Column
impl RefFromWasmAbi for Column
Source§impl RefMutFromWasmAbi for Column
impl RefMutFromWasmAbi for Column
Source§impl TryFromJsValue for Column
impl TryFromJsValue for Column
Source§impl VectorFromWasmAbi for Column
impl VectorFromWasmAbi for Column
Source§impl VectorIntoWasmAbi for Column
impl VectorIntoWasmAbi for Column
impl SupportsConstructor for Column
impl SupportsInstanceProperty for Column
impl SupportsStaticProperty for Column
Auto Trait Implementations§
impl Freeze for Column
impl RefUnwindSafe for Column
impl Send for Column
impl Sync for Column
impl Unpin for Column
impl UnwindSafe for Column
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.