pub trait ToSql {
fn to_sql(&self) -> Result<ToSqlOutput<'_>>;
}
Expand description
A trait for types that can be converted into SQLite values.
Required Methods§
fn to_sql(&self) -> Result<ToSqlOutput<'_>>
Implementations on Foreign Types§
source§impl ToSql for NaiveDate
impl ToSql for NaiveDate
ISO 8601 calendar date without timezone => “YYYY-MM-DD”
fn to_sql(&self) -> Result<ToSqlOutput<'_>>
source§impl ToSql for NaiveTime
impl ToSql for NaiveTime
ISO 8601 time without timezone => “HH:MM:SS.SSS”
fn to_sql(&self) -> Result<ToSqlOutput<'_>>
source§impl ToSql for NaiveDateTime
impl ToSql for NaiveDateTime
ISO 8601 combined date and time without timezone => “YYYY-MM-DD HH:MM:SS.SSS”
fn to_sql(&self) -> Result<ToSqlOutput<'_>>
source§impl<Tz: TimeZone> ToSql for DateTime<Tz>
impl<Tz: TimeZone> ToSql for DateTime<Tz>
Date and time with time zone => UTC RFC3339 timestamp (“YYYY-MM-DDTHH:MM:SS.SSS+00:00”).
fn to_sql(&self) -> Result<ToSqlOutput<'_>>
source§impl ToSql for Value
impl ToSql for Value
Serialize JSON Value
to text.