Trait sea_orm::ColIdx

source ·
pub trait ColIdx: Debug + Copy {
    type SqlxMySqlIndex: ColumnIndex<MySqlRow>;
    type SqlxPostgresIndex: ColumnIndex<PgRow>;
    type SqlxSqliteIndex: ColumnIndex<SqliteRow>;

    // Required methods
    fn as_sqlx_mysql_index(&self) -> Self::SqlxMySqlIndex;
    fn as_sqlx_postgres_index(&self) -> Self::SqlxPostgresIndex;
    fn as_sqlx_sqlite_index(&self) -> Self::SqlxSqliteIndex;
    fn as_str(&self) -> Option<&str>;
    fn as_usize(&self) -> Option<&usize>;
}
Expand description

Column Index, used by TryGetable. Implemented for &str and usize

Required Associated Types§

Required Methods§

source

fn as_sqlx_mysql_index(&self) -> Self::SqlxMySqlIndex

Basically a no-op; only to satisfy trait bounds

source

fn as_sqlx_postgres_index(&self) -> Self::SqlxPostgresIndex

Basically a no-op; only to satisfy trait bounds

source

fn as_sqlx_sqlite_index(&self) -> Self::SqlxSqliteIndex

Basically a no-op; only to satisfy trait bounds

source

fn as_str(&self) -> Option<&str>

Self must be &str, return None otherwise

source

fn as_usize(&self) -> Option<&usize>

Self must be usize, return None otherwise

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl ColIdx for &str

source§

impl ColIdx for usize

Implementors§