[−][src]Trait rusqlite::types::FromSql
A trait for types that can be created from a SQLite value.
Note that FromSql
and ToSql
are defined for most integral types, but
not u64
or usize
. This is intentional; SQLite returns integers as
signed 64-bit values, which cannot fully represent the range of these
types. Rusqlite would have to
decide how to handle negative values: return an error or reinterpret as a
very large postive numbers, neither of which
is guaranteed to be correct for everyone. Callers can work around this by
fetching values as i64 and then doing the interpretation themselves or by
defining a newtype and implementing FromSql
/ToSql
for it.
Required methods
fn column_result(value: ValueRef) -> FromSqlResult<Self>
Implementations on Foreign Types
impl FromSql for NaiveDate
[src]
"YYYY-MM-DD" => ISO 8601 calendar date without timezone.
fn column_result(value: ValueRef) -> FromSqlResult<Self>
[src]
impl FromSql for NaiveTime
[src]
"HH:MM"/"HH:MM:SS"/"HH:MM:SS.SSS" => ISO 8601 time without timezone.
fn column_result(value: ValueRef) -> FromSqlResult<Self>
[src]
impl FromSql for NaiveDateTime
[src]
"YYYY-MM-DD HH:MM:SS"/"YYYY-MM-DD HH:MM:SS.SSS" => ISO 8601 combined date and time without timezone. ("YYYY-MM-DDTHH:MM:SS"/"YYYY-MM-DDTHH:MM:SS.SSS" also supported)
fn column_result(value: ValueRef) -> FromSqlResult<Self>
[src]
impl FromSql for DateTime<Utc>
[src]
RFC3339 ("YYYY-MM-DDTHH:MM:SS.SSS[+-]HH:MM") into DateTime<Utc>
.
fn column_result(value: ValueRef) -> FromSqlResult<Self>
[src]
impl FromSql for DateTime<Local>
[src]
RFC3339 ("YYYY-MM-DDTHH:MM:SS.SSS[+-]HH:MM") into DateTime<Local>
.
fn column_result(value: ValueRef) -> FromSqlResult<Self>
[src]
impl FromSql for isize
[src]
fn column_result(value: ValueRef) -> FromSqlResult<Self>
[src]
impl FromSql for i8
[src]
fn column_result(value: ValueRef) -> FromSqlResult<Self>
[src]
impl FromSql for i16
[src]
fn column_result(value: ValueRef) -> FromSqlResult<Self>
[src]
impl FromSql for i32
[src]
fn column_result(value: ValueRef) -> FromSqlResult<Self>
[src]
impl FromSql for u8
[src]
fn column_result(value: ValueRef) -> FromSqlResult<Self>
[src]
impl FromSql for u16
[src]
fn column_result(value: ValueRef) -> FromSqlResult<Self>
[src]
impl FromSql for u32
[src]
fn column_result(value: ValueRef) -> FromSqlResult<Self>
[src]
impl FromSql for i64
[src]
fn column_result(value: ValueRef) -> FromSqlResult<Self>
[src]
impl FromSql for f64
[src]
fn column_result(value: ValueRef) -> FromSqlResult<Self>
[src]
impl FromSql for bool
[src]
fn column_result(value: ValueRef) -> FromSqlResult<Self>
[src]
impl FromSql for String
[src]
fn column_result(value: ValueRef) -> FromSqlResult<Self>
[src]
impl FromSql for Vec<u8>
[src]
fn column_result(value: ValueRef) -> FromSqlResult<Self>
[src]
impl<T: FromSql> FromSql for Option<T>
[src]
fn column_result(value: ValueRef) -> FromSqlResult<Self>
[src]
impl FromSql for Value
[src]
Deserialize text/blob to JSON Value
.
fn column_result(value: ValueRef) -> FromSqlResult<Self>
[src]
impl FromSql for Timespec
[src]
fn column_result(value: ValueRef) -> FromSqlResult<Self>
[src]
impl FromSql for Url
[src]
Deserialize text to Url
.