pub trait SQLColumnInfo:
Any
+ Send
+ Sync {
// Required methods
fn is_not_null(&self) -> bool;
fn is_primary_key(&self) -> bool;
fn is_unique(&self) -> bool;
fn name(&self) -> &str;
fn type(&self) -> &str;
fn has_default(&self) -> bool;
fn table(&self) -> &dyn SQLTableInfo;
// Provided methods
fn foreign_key(&self) -> Option<&'static dyn SQLColumnInfo> { ... }
fn foreign_key_table(&self) -> Option<&'static dyn SQLTableInfo> { ... }
fn as_column(&self) -> &dyn SQLColumnInfo
where Self: Sized { ... }
}Required Methods§
fn is_not_null(&self) -> bool
fn is_primary_key(&self) -> bool
fn is_unique(&self) -> bool
fn name(&self) -> &str
fn type(&self) -> &str
fn has_default(&self) -> bool
fn table(&self) -> &dyn SQLTableInfo
Provided Methods§
Sourcefn foreign_key(&self) -> Option<&'static dyn SQLColumnInfo>
fn foreign_key(&self) -> Option<&'static dyn SQLColumnInfo>
Returns the foreign key reference if this column has one.
Sourcefn foreign_key_table(&self) -> Option<&'static dyn SQLTableInfo>
fn foreign_key_table(&self) -> Option<&'static dyn SQLTableInfo>
Returns the foreign key table if this column references one.
fn as_column(&self) -> &dyn SQLColumnInfowhere
Self: Sized,
Trait Implementations§
Source§impl Debug for dyn SQLColumnInfo
impl Debug for dyn SQLColumnInfo
Source§impl<'a, V: SQLParam> From<&'static dyn SQLColumnInfo> for SQLChunk<'a, V>
impl<'a, V: SQLParam> From<&'static dyn SQLColumnInfo> for SQLChunk<'a, V>
Source§fn from(value: &'static dyn SQLColumnInfo) -> Self
fn from(value: &'static dyn SQLColumnInfo) -> Self
Converts to this type from the input type.