pub trait ColIdx: Debug + Copy {
type SqlxMySqlIndex: ColumnIndex<MySqlRow>;
type SqlxPostgresIndex: ColumnIndex<PgRow>;
type SqlxSqliteIndex: ColumnIndex<SqliteRow>;
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§
sourcetype SqlxMySqlIndex: ColumnIndex<MySqlRow>
type SqlxMySqlIndex: ColumnIndex<MySqlRow>
Type surrogate
sourcetype SqlxPostgresIndex: ColumnIndex<PgRow>
type SqlxPostgresIndex: ColumnIndex<PgRow>
Type surrogate
sourcetype SqlxSqliteIndex: ColumnIndex<SqliteRow>
type SqlxSqliteIndex: ColumnIndex<SqliteRow>
Type surrogate
Required Methods§
sourcefn as_sqlx_mysql_index(&self) -> Self::SqlxMySqlIndex
fn as_sqlx_mysql_index(&self) -> Self::SqlxMySqlIndex
Basically a no-op; only to satisfy trait bounds
sourcefn as_sqlx_postgres_index(&self) -> Self::SqlxPostgresIndex
fn as_sqlx_postgres_index(&self) -> Self::SqlxPostgresIndex
Basically a no-op; only to satisfy trait bounds
sourcefn as_sqlx_sqlite_index(&self) -> Self::SqlxSqliteIndex
fn as_sqlx_sqlite_index(&self) -> Self::SqlxSqliteIndex
Basically a no-op; only to satisfy trait bounds