SQLColumn

Trait SQLColumn 

Source
pub trait SQLColumn<'a, Value: SQLParam + 'a>:
    SQLColumnInfo
    + Default
    + SQLSchema<'a, &'a str, Value>
    + Expr<'a, Value> {
    type Table: SQLTable<'a, Self::TableType, Value>;
    type TableType: SQLSchemaType;
    type Type: TryInto<Value>;

    const PRIMARY_KEY: bool = false;
    const NOT_NULL: bool = false;
    const UNIQUE: bool = false;
    const DEFAULT: Option<Self::Type> = None;

    // Provided method
    fn default_fn(&'a self) -> Option<impl Fn() -> Self::Type> { ... }
}
Expand description

Column trait tying expression lifetimes to parameter values via 'a.

Provided Associated Constants§

Source

const PRIMARY_KEY: bool = false

Source

const NOT_NULL: bool = false

Source

const UNIQUE: bool = false

Source

const DEFAULT: Option<Self::Type> = None

Required Associated Types§

Provided Methods§

Source

fn default_fn(&'a self) -> Option<impl Fn() -> Self::Type>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§