Trait diesel::types::ToSql
[−]
[src]
pub trait ToSql<A: NativeSqlType> { fn to_sql<W: Write>(&self, out: &mut W) -> Result<IsNull, Box<Error>>; }
Serializes a single value to be sent to the database. The output will be included as a bind parameter, and is expected to be the binary format, not text.
Required Methods
Implementors
impl<'a, ST, T> ToSql<Array<ST>> for &'a [T] where ST: NativeSqlType, T: ToSql<ST>
impl<ST, T> ToSql<Array<ST>> for Vec<T> where ST: NativeSqlType, T: ToSql<ST>
impl<'a> ToSql<Nullable<Date>> for PgDate
impl<'a> ToSql<Nullable<Interval>> for PgInterval
impl<'a> ToSql<Nullable<Time>> for PgTime
impl<'a> ToSql<Nullable<Timestamp>> for PgTimestamp
impl ToSql<Timestamp> for PgTimestamp
impl ToSql<Date> for PgDate
impl ToSql<Time> for PgTime
impl ToSql<Interval> for PgInterval
impl ToSql<Float> for f32
impl ToSql<Double> for f64
impl ToSql<Numeric> for PgNumeric
impl ToSql<SmallInt> for i16
impl ToSql<Integer> for i32
impl ToSql<BigInt> for i64
impl ToSql<Oid> for u32
impl<T, ST> ToSql<Nullable<ST>> for Option<T> where T: ToSql<ST>, ST: NativeSqlType
impl<'a> ToSql<Nullable<Bool>> for bool
impl<'a> ToSql<Nullable<SmallInt>> for i16
impl<'a> ToSql<Nullable<Integer>> for i32
impl<'a> ToSql<Nullable<BigInt>> for i64
impl<'a> ToSql<Nullable<Oid>> for u32
impl<'a> ToSql<Nullable<Float>> for f32
impl<'a> ToSql<Nullable<Double>> for f64
impl<'a> ToSql<Nullable<Numeric>> for PgNumeric
impl<'a> ToSql<Nullable<VarChar>> for String
impl<'a> ToSql<Nullable<Text>> for String
impl<'a> ToSql<Nullable<Binary>> for Vec<u8>
impl<'a> ToSql<Nullable<VarChar>> for &'a str
impl<'a> ToSql<Nullable<Text>> for &'a str
impl<'a> ToSql<Nullable<Binary>> for &'a [u8]
impl ToSql<Bool> for bool
impl ToSql<VarChar> for String
impl<'a> ToSql<VarChar> for &'a str
impl ToSql<Text> for String
impl<'a> ToSql<Text> for &'a str
impl ToSql<Binary> for Vec<u8>
impl<'a> ToSql<Binary> for &'a [u8]
impl<'a, T: ?Sized, ST> ToSql<ST> for Cow<'a, T> where ST: NativeSqlType, T: 'a + ToOwned + ToSql<ST>, T::Owned: ToSql<ST>
impl<'a, A, T> ToSql<A> for &'a T where A: NativeSqlType, T: ToSql<A>