SQLColumnInfo

Trait SQLColumnInfo 

Source
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 method
    fn foreign_key(&self) -> Option<&'static dyn SQLColumnInfo> { ... }
}

Required Methods§

Source

fn is_not_null(&self) -> bool

Source

fn is_primary_key(&self) -> bool

Source

fn is_unique(&self) -> bool

Source

fn name(&self) -> &str

Source

fn type(&self) -> &str

Source

fn has_default(&self) -> bool

Source

fn table(&self) -> &dyn SQLTableInfo

Provided Methods§

Source

fn foreign_key(&self) -> Option<&'static dyn SQLColumnInfo>

Returns the foreign key reference if this column has one

Trait Implementations§

Source§

impl Debug for dyn SQLColumnInfo

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a, V: SQLParam> From<&'static dyn SQLColumnInfo> for SQLChunk<'a, V>

Source§

fn from(value: &'static dyn SQLColumnInfo) -> Self

Converts to this type from the input type.
Source§

impl<'a, V: SQLParam + 'a> ToSQL<'a, V> for &'static dyn SQLColumnInfo

Source§

fn to_sql(&self) -> SQL<'a, V>

Source§

fn alias(&self, alias: &'static str) -> SQL<'a, V>

Implementors§