pub struct TypedColumn<T> {
pub column: Column,
pub source_name: String,
pub schema: Option<String>,
/* private fields */
}Expand description
A type-safe column reference that preserves type information
Fields§
§column: ColumnThe actual column data
source_name: StringThe table or view this column belongs to
schema: Option<String>Schema name if present
Implementations§
Source§impl<T> TypedColumn<T>
impl<T> TypedColumn<T>
Sourcepub fn new(
column: SchemaColumn,
source_name: String,
schema: Option<String>,
) -> Self
pub fn new( column: SchemaColumn, source_name: String, schema: Option<String>, ) -> Self
Create a new typed column
Sourcepub fn qualified_name(&self) -> String
pub fn qualified_name(&self) -> String
Get the fully qualified column name
Sourcepub fn eq(&self, value: T) -> WhereConditionwhere
T: ToString,
pub fn eq(&self, value: T) -> WhereConditionwhere
T: ToString,
Create an equality condition
Sourcepub fn gt(&self, value: T) -> WhereConditionwhere
T: ToString,
pub fn gt(&self, value: T) -> WhereConditionwhere
T: ToString,
Create a greater than condition
Sourcepub fn lt(&self, value: T) -> WhereConditionwhere
T: ToString,
pub fn lt(&self, value: T) -> WhereConditionwhere
T: ToString,
Create a less than condition
Sourcepub fn in_values(&self, values: Vec<T>) -> WhereConditionwhere
T: ToString,
pub fn in_values(&self, values: Vec<T>) -> WhereConditionwhere
T: ToString,
Create an IN condition
Sourcepub fn like(&self, pattern: &str) -> WhereCondition
pub fn like(&self, pattern: &str) -> WhereCondition
Create a LIKE condition (for string columns)
Sourcepub fn is_null(&self) -> WhereCondition
pub fn is_null(&self) -> WhereCondition
Create an IS NULL condition
Sourcepub fn is_not_null(&self) -> WhereCondition
pub fn is_not_null(&self) -> WhereCondition
Create an IS NOT NULL condition
Trait Implementations§
Source§impl<T: Clone> Clone for TypedColumn<T>
impl<T: Clone> Clone for TypedColumn<T>
Source§fn clone(&self) -> TypedColumn<T>
fn clone(&self) -> TypedColumn<T>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T> ColumnLike for TypedColumn<T>
impl<T> ColumnLike for TypedColumn<T>
Source§fn qualified_name(&self) -> String
fn qualified_name(&self) -> String
Get the qualified column name
Source§impl<T: Debug> Debug for TypedColumn<T>
impl<T: Debug> Debug for TypedColumn<T>
Source§impl<T> Into<String> for TypedColumn<T>
Convert TypedColumn to String for flexible query building
impl<T> Into<String> for TypedColumn<T>
Convert TypedColumn to String for flexible query building
Auto Trait Implementations§
impl<T> Freeze for TypedColumn<T>
impl<T> RefUnwindSafe for TypedColumn<T>where
T: RefUnwindSafe,
impl<T> Send for TypedColumn<T>where
T: Send,
impl<T> Sync for TypedColumn<T>where
T: Sync,
impl<T> Unpin for TypedColumn<T>where
T: Unpin,
impl<T> UnsafeUnpin for TypedColumn<T>
impl<T> UnwindSafe for TypedColumn<T>where
T: UnwindSafe,
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more