Trait ToSql

Source
pub trait ToSql {
    // Required method
    fn write_sql_unchecked(&self, sql: &mut String);

    // Provided methods
    fn write_sql(&self, sql: &mut String)
       where Self: CheckedSql { ... }
    fn to_sql_unchecked(&self) -> String { ... }
    fn to_sql(&self) -> String
       where Self: CheckedSql { ... }
}

Required Methods§

Source

fn write_sql_unchecked(&self, sql: &mut String)

Provided Methods§

Source

fn write_sql(&self, sql: &mut String)
where Self: CheckedSql,

Source

fn to_sql_unchecked(&self) -> String

Source

fn to_sql(&self) -> String
where Self: CheckedSql,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<B: Binding> ToSql for Execute<'_, B>

Source§

impl<B: Binding, S: ToSql> ToSql for Prepare<'_, B, S>

Source§

impl<Q, O> ToSql for OrderBy<Q, O>
where Q: Select, O: Order,

Source§

impl<Q: Select> ToSql for Limit<Q>

Source§

impl<S, O> ToSql for GroupBy<S, O>
where S: Select, O: GroupOrder,

Source§

impl<S, P> ToSql for Filter<S, P>
where S: ToSql, P: Predicate,

Source§

impl<S, Q> ToSql for SelectStatement<S, Q>

Source§

impl<T, I> ToSql for InsertStatement<T, Values<I>>
where T: Table, I: IntoIterator + Clone, I::Item: Insertable,

Source§

impl<T, I> ToSql for InsertStatement<T, I>
where T: Table + ?Sized, I: Insertable,

Source§

impl<T, S> ToSql for Update<T, S>
where T: Table + ?Sized, S: UpdateSet,

Source§

impl<T: Table + ?Sized> ToSql for Delete<T>