pub trait ToSql { fn to_sql(&self) -> SqlVal; fn to_sql_ref(&self) -> SqlValRef<'_>; fn into_sql(self) -> SqlVal { ... } }
Used to convert another type to a SqlVal or SqlValRef.
SqlVal
SqlValRef
fn to_sql(&self) -> SqlVal
fn to_sql_ref(&self) -> SqlValRef<'_>
fn into_sql(self) -> SqlVal
The default implementation simply calls to_sql. Provide an alternative implementation if greater efficiency can be realized by consuming self.
to_sql
impl ToSql for Uuid
pub fn to_sql(&self) -> SqlVal
pub fn to_sql_ref(&self) -> SqlValRef<'_>
impl ToSql for i32
pub fn into_sql(self) -> SqlVal
impl ToSql for String
impl<'_> ToSql for &'_ str
impl ToSql for i16
impl ToSql for Vec<u8, Global>
impl ToSql for u8
impl ToSql for u32
impl ToSql for NaiveDateTime
impl ToSql for i8
impl ToSql for i64
impl ToSql for f64
impl<T> ToSql for Option<T> where T: ToSql,
impl ToSql for u16
impl ToSql for f32
impl ToSql for bool
impl ToSql for str
impl<T> ToSql for ForeignKey<T> where T: DataObject,