pub trait ToSql {
// Required method
fn to_sql(&self) -> Result<ToSqlOutput<'_>>;
}Expand description
A trait for types that can be converted into SQLite values. Returns
crate::Error::ToSqlConversionFailure if the conversion fails.
Required Methods§
Sourcefn to_sql(&self) -> Result<ToSqlOutput<'_>>
fn to_sql(&self) -> Result<ToSqlOutput<'_>>
Converts Rust value to SQLite value
Implementations on Foreign Types§
Source§impl ToSql for Date
ISO 8601 calendar date without timezone => “YYYY-MM-DD”
impl ToSql for Date
ISO 8601 calendar date without timezone => “YYYY-MM-DD”
fn to_sql(&self) -> Result<ToSqlOutput<'_>>
Source§impl ToSql for OffsetDateTime
OffsetDatetime => RFC3339 format (“YYYY-MM-DD HH:MM:SS.SSS[+-]HH:MM”)
impl ToSql for OffsetDateTime
OffsetDatetime => RFC3339 format (“YYYY-MM-DD HH:MM:SS.SSS[+-]HH:MM”)
fn to_sql(&self) -> Result<ToSqlOutput<'_>>
Source§impl ToSql for PrimitiveDateTime
ISO 8601 combined date and time without timezone => “YYYY-MM-DD HH:MM:SS.SSS”
impl ToSql for PrimitiveDateTime
ISO 8601 combined date and time without timezone => “YYYY-MM-DD HH:MM:SS.SSS”
fn to_sql(&self) -> Result<ToSqlOutput<'_>>
Source§impl ToSql for Time
ISO 8601 time without timezone => “HH:MM:SS.SSS”
impl ToSql for Time
ISO 8601 time without timezone => “HH:MM:SS.SSS”