pub trait FromSql: Sized {
fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>;
}
Expand description
A trait for types that can be created from a SQLite value.
Required methods
fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>
fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>
Converts SQLite value into Rust value.
Implementations on Foreign Types
sourceimpl FromSql for NaiveDate
This is supported on crate feature chrono
only.
impl FromSql for NaiveDate
This is supported on crate feature
chrono
only.“YYYY-MM-DD” => ISO 8601 calendar date without timezone.
fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>
sourceimpl FromSql for NaiveTime
This is supported on crate feature chrono
only.
impl FromSql for NaiveTime
This is supported on crate feature
chrono
only.“HH:MM”/“HH:MM:SS”/“HH:MM:SS.SSS” => ISO 8601 time without timezone.
fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>
sourceimpl FromSql for NaiveDateTime
This is supported on crate feature chrono
only.
impl FromSql for NaiveDateTime
This is supported on crate feature
chrono
only.“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>
sourceimpl FromSql for DateTime<Utc>
This is supported on crate feature chrono
only.
impl FromSql for DateTime<Utc>
This is supported on crate feature
chrono
only.RFC3339 (“YYYY-MM-DD HH:MM:SS.SSS[+-]HH:MM”) into DateTime<Utc>
.
fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>
sourceimpl FromSql for DateTime<Local>
This is supported on crate feature chrono
only.
impl FromSql for DateTime<Local>
This is supported on crate feature
chrono
only.RFC3339 (“YYYY-MM-DD HH:MM:SS.SSS[+-]HH:MM”) into DateTime<Local>
.
fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>
sourceimpl FromSql for DateTime<FixedOffset>
This is supported on crate feature chrono
only.
impl FromSql for DateTime<FixedOffset>
This is supported on crate feature
chrono
only.RFC3339 (“YYYY-MM-DD HH:MM:SS.SSS[+-]HH:MM”) into DateTime<FixedOffset>
.
fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>
sourceimpl FromSql for i8
impl FromSql for i8
fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>
sourceimpl FromSql for i16
impl FromSql for i16
fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>
sourceimpl FromSql for i32
impl FromSql for i32
fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>
sourceimpl FromSql for isize
impl FromSql for isize
fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>
sourceimpl FromSql for u8
impl FromSql for u8
fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>
sourceimpl FromSql for u16
impl FromSql for u16
fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>
sourceimpl FromSql for u32
impl FromSql for u32
fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>
sourceimpl FromSql for u64
impl FromSql for u64
fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>
sourceimpl FromSql for usize
impl FromSql for usize
fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>
sourceimpl FromSql for i64
impl FromSql for i64
fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>
sourceimpl FromSql for f32
impl FromSql for f32
fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>
sourceimpl FromSql for f64
impl FromSql for f64
fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>
sourceimpl FromSql for bool
impl FromSql for bool
fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>
sourceimpl FromSql for String
impl FromSql for String
fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>
sourceimpl FromSql for Box<str>
impl FromSql for Box<str>
fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>
sourceimpl FromSql for Rc<str>
impl FromSql for Rc<str>
fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>
sourceimpl FromSql for Arc<str>
impl FromSql for Arc<str>
fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>
sourceimpl FromSql for Vec<u8>
impl FromSql for Vec<u8>
fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>
sourceimpl<const N: usize> FromSql for [u8; N]
impl<const N: usize> FromSql for [u8; N]
fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>
sourceimpl FromSql for i128
This is supported on crate feature i128_blob
only.
impl FromSql for i128
This is supported on crate feature
i128_blob
only.fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>
sourceimpl FromSql for Uuid
This is supported on crate feature uuid
only.
impl FromSql for Uuid
This is supported on crate feature
uuid
only.fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>
sourceimpl<T: FromSql> FromSql for Option<T>
impl<T: FromSql> FromSql for Option<T>
fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>
sourceimpl FromSql for Value
This is supported on crate feature serde_json
only.
impl FromSql for Value
This is supported on crate feature
serde_json
only.Deserialize text/blob to JSON Value
.
fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>
sourceimpl FromSql for OffsetDateTime
This is supported on crate feature time
only.
impl FromSql for OffsetDateTime
This is supported on crate feature
time
only.fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>
sourceimpl FromSql for Url
This is supported on crate feature url
only.
impl FromSql for Url
This is supported on crate feature
url
only.Deserialize text to Url
.