PostgresColumnInfo

Trait PostgresColumnInfo 

Source
pub trait PostgresColumnInfo: SQLColumnInfo + Any {
    // Required methods
    fn table(&self) -> &dyn PostgresTableInfo;
    fn is_serial(&self) -> bool;
    fn is_bigserial(&self) -> bool;
    fn is_generated_identity(&self) -> bool;
    fn postgres_type(&self) -> &'static str;

    // Provided methods
    fn foreign_key(&self) -> Option<&'static dyn PostgresColumnInfo> { ... }
    fn as_postgres_column(&self) -> &dyn PostgresColumnInfo
       where Self: Sized { ... }
    fn foreign_key_core(&self) -> Option<&'static dyn SQLColumnInfo> { ... }
}

Required Methods§

Source

fn table(&self) -> &dyn PostgresTableInfo

Source

fn is_serial(&self) -> bool

Source

fn is_bigserial(&self) -> bool

Source

fn is_generated_identity(&self) -> bool

Source

fn postgres_type(&self) -> &'static str

Provided Methods§

Source

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

Returns the foreign key reference if this column has one

Source

fn as_postgres_column(&self) -> &dyn PostgresColumnInfo
where Self: Sized,

Erased access to the Postgres column info.

Source

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

Core-erased foreign key reference for call sites that only need generic info.

Trait Implementations§

Source§

impl Debug for dyn PostgresColumnInfo

Source§

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

Formats the value using the given formatter. Read more

Implementations on Foreign Types§

Source§

impl<T: PostgresColumnInfo> PostgresColumnInfo for &'static T

Implementors§