Trait rusqlite::types::FromSql [] [src]

pub trait FromSql {
    unsafe fn column_result(stmt: *mut sqlite3_stmt, col: c_int) -> SqliteResult<Self>;

    unsafe fn column_has_valid_sqlite_type(_: *mut sqlite3_stmt, _: c_int) -> bool { ... }
}

A trait for types that can be created from a SQLite value.

Required Methods

unsafe fn column_result(stmt: *mut sqlite3_stmt, col: c_int) -> SqliteResult<Self>

Provided Methods

unsafe fn column_has_valid_sqlite_type(_: *mut sqlite3_stmt, _: c_int) -> bool

FromSql types can implement this method and use sqlite3_column_type to check that the type reported by SQLite matches a type suitable for Self. This method is used by SqliteRow::get_checked to confirm that the column contains a valid type before attempting to retrieve the value.

Implementors