Trait sqlx_core::column::Column

source ·
pub trait Column: Sealed + 'static + Send + Sync + Debug {
    type Database: Database;

    // Required methods
    fn ordinal(&self) -> usize;
    fn name(&self) -> &str;
    fn type_info(&self) -> &<Self::Database as Database>::TypeInfo;
}

Required Associated Types§

Required Methods§

source

fn ordinal(&self) -> usize

Gets the column ordinal.

This can be used to unambiguously refer to this column within a row in case more than one column have the same name

source

fn name(&self) -> &str

Gets the column name or alias.

The column name is unreliable (and can change between database minor versions) if this column is an expression that has not been aliased.

source

fn type_info(&self) -> &<Self::Database as Database>::TypeInfo

Gets the type information for the column.

Implementors§