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 f32impl<DB: Backend<RawValue = [u8]>> FromSql<Double, DB> for f64impl<DB: Backend<RawValue = [u8]>> FromSql<SmallInt, DB> for i16impl<DB: Backend<RawValue = [u8]>> FromSql<Integer, DB> for i32impl<DB: Backend<RawValue = [u8]>> FromSql<BigInt, DB> for i64impl<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 Stringimpl<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<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 SystemTimeimpl FromSql<Timestamp, Pg> for PgTimestampimpl FromSql<Timestamptz, Pg> for PgTimestampimpl FromSql<Date, Pg> for PgDateimpl FromSql<Time, Pg> for PgTimeimpl FromSql<Interval, Pg> for PgIntervalimpl FromSql<Numeric, Pg> for PgNumericimpl FromSql<Oid, Pg> for u32impl FromSql<Bool, Pg> for boolimpl FromSql<Money, Pg> for PgMoney