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
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
Available on crate feature time
only.ISO 8601 calendar date without timezone => “YYYY-MM-DD”
impl ToSql for Date
Available on crate feature
time
only.ISO 8601 calendar date without timezone => “YYYY-MM-DD”
fn to_sql(&self) -> Result<ToSqlOutput<'_>>
Source§impl ToSql for OffsetDateTime
Available on crate feature time
only.OffsetDatetime
=> RFC3339 format (“YYYY-MM-DD HH:MM:SS.SSS[+-]HH:MM”)
impl ToSql for OffsetDateTime
Available on crate feature
time
only.OffsetDatetime
=> RFC3339 format (“YYYY-MM-DD HH:MM:SS.SSS[+-]HH:MM”)
fn to_sql(&self) -> Result<ToSqlOutput<'_>>
Source§impl ToSql for PrimitiveDateTime
Available on crate feature time
only.ISO 8601 combined date and time without timezone => “YYYY-MM-DD HH:MM:SS.SSS”
impl ToSql for PrimitiveDateTime
Available on crate feature
time
only.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
Available on crate feature time
only.ISO 8601 time without timezone => “HH:MM:SS.SSS”
impl ToSql for Time
Available on crate feature
time
only.ISO 8601 time without timezone => “HH:MM:SS.SSS”