Trait pleingres::ToSql [−][src]
pub trait ToSql { fn write_sql(&self, w: &mut Vec<u8>) -> bool; fn sql_type(&self) -> SqlType { ... } fn format_code(&self) -> FormatCode { ... } }
Trait used to convert a type to its SQL representation.
Required Methods
fn write_sql(&self, w: &mut Vec<u8>) -> bool
How to serialize this type in a Postgres-compatible way. Returns true if and only if *self is not serialized to SQL NULL.
Provided Methods
fn sql_type(&self) -> SqlType
Postgres type code for this type.
fn format_code(&self) -> FormatCode
Postgres format code for this type.
Implementations on Foreign Types
impl ToSql for bool
[src]
impl ToSql for bool
impl<S: ToSql> ToSql for Option<S>
[src]
impl<S: ToSql> ToSql for Option<S>
impl<Tz: TimeZone> ToSql for DateTime<Tz> where
Tz::Offset: Display,
[src]
impl<Tz: TimeZone> ToSql for DateTime<Tz> where
Tz::Offset: Display,
impl ToSql for i64
[src]
impl ToSql for i64
impl ToSql for i32
[src]
impl ToSql for i32
impl ToSql for String
[src]
impl ToSql for String
impl<'a> ToSql for Cow<'a, str>
[src]
impl<'a> ToSql for Cow<'a, str>
impl<'a> ToSql for &'a str
[src]
impl<'a> ToSql for &'a str
impl ToSql for Uuid
[src]
impl ToSql for Uuid
impl ToSql for SocketAddr
[src]
impl ToSql for SocketAddr
impl ToSql for IpAddr
[src]
impl ToSql for IpAddr