Trait diesel::types::FromSql
[−]
[src]
pub trait FromSql<A, DB: Backend + HasSqlType<A>>: Sized { fn from_sql(
bytes: Option<&DB::RawValue>
) -> Result<Self, Box<Error + Send + Sync>>; }
How to deserialize a single field of a given type. The input will always be the binary representation, not the text.
Required Methods
Implementors
impl<DB: Backend<RawValue = [u8]>> FromSql<Float, DB> for f32
impl<DB: Backend<RawValue = [u8]>> FromSql<Double, DB> for f64
impl<DB: Backend<RawValue = [u8]>> FromSql<SmallInt, DB> for i16
impl<DB: Backend<RawValue = [u8]>> FromSql<Integer, DB> for i32
impl<DB: Backend<RawValue = [u8]>> FromSql<BigInt, DB> for i64
impl<T, ST, DB> FromSql<Nullable<ST>, DB> for Option<T> where
T: FromSql<ST, DB>,
DB: Backend + HasSqlType<ST>,
ST: NotNull,impl<DB: Backend<RawValue = [u8]>> FromSql<Text, DB> for String
impl<DB: Backend<RawValue = [u8]>> FromSql<Binary, DB> for Vec<u8>
impl<'a, T: ?Sized, ST, DB> FromSql<ST, DB> for Cow<'a, T> where
T: 'a + ToOwned,
DB: Backend + HasSqlType<ST>,
T::Owned: FromSql<ST, DB>,impl FromSql<Datetime, Mysql> for MYSQL_TIME
impl FromSql<Timestamp, Mysql> for MYSQL_TIME
impl FromSql<Time, Mysql> for MYSQL_TIME
impl FromSql<Date, Mysql> for MYSQL_TIME
impl FromSql<Datetime, Mysql> for NaiveDateTime
impl FromSql<Timestamp, Mysql> for NaiveDateTime
impl FromSql<Time, Mysql> for NaiveTime
impl FromSql<Date, Mysql> for NaiveDate
impl FromSql<Numeric, Mysql> for BigDecimal
impl FromSql<Tinyint, Mysql> for i8
impl FromSql<Bool, Mysql> for bool
impl<T, ST> FromSql<Array<ST>, Pg> for Vec<T> where
T: FromSql<ST, Pg>,
Pg: HasSqlType<ST>,impl<T, ST> FromSql<Range<ST>, Pg> for (Bound<T>, Bound<T>) where
T: FromSql<ST, Pg>,
Pg: HasSqlType<ST> + HasSqlType<Range<ST>>,impl FromSql<Timestamp, Pg> for SystemTime
impl FromSql<Timestamp, Pg> for NaiveDateTime
impl FromSql<Timestamptz, Pg> for NaiveDateTime
impl FromSql<Timestamptz, Pg> for DateTime<Utc>
impl FromSql<Time, Pg> for NaiveTime
impl FromSql<Date, Pg> for NaiveDate
impl FromSql<Timestamp, Pg> for Timespec
impl FromSql<Timestamp, Pg> for PgTimestamp
impl FromSql<Timestamptz, Pg> for PgTimestamp
impl FromSql<Date, Pg> for PgDate
impl FromSql<Time, Pg> for PgTime
impl FromSql<Interval, Pg> for PgInterval
impl FromSql<Numeric, Pg> for PgNumeric
impl FromSql<MacAddr, Pg> for [u8; 6]
impl FromSql<Inet, Pg> for IpNetwork
impl FromSql<Cidr, Pg> for IpNetwork
impl FromSql<Oid, Pg> for u32
impl FromSql<Numeric, Pg> for BigDecimal
impl FromSql<Bool, Pg> for bool
impl FromSql<Uuid, Pg> for Uuid
impl FromSql<Json, Pg> for Value
impl FromSql<Jsonb, Pg> for Value
impl FromSql<Money, Pg> for PgMoney
impl FromSql<Date, Sqlite> for NaiveDate
impl FromSql<Time, Sqlite> for NaiveTime
impl FromSql<Timestamp, Sqlite> for NaiveDateTime
impl FromSql<Date, Sqlite> for String
impl FromSql<Time, Sqlite> for String
impl FromSql<Timestamp, Sqlite> for String
impl FromSql<VarChar, Sqlite> for String
impl FromSql<Binary, Sqlite> for Vec<u8>
impl FromSql<SmallInt, Sqlite> for i16
impl FromSql<Integer, Sqlite> for i32
impl FromSql<Bool, Sqlite> for bool
impl FromSql<BigInt, Sqlite> for i64
impl FromSql<Float, Sqlite> for f32
impl FromSql<Double, Sqlite> for f64