Trait BuildCondition

Source
pub trait BuildCondition<'a>: 'a {
    // Required method
    fn build_to_writer(
        &self,
        writer: &mut impl Write,
        dialect: DBImpl,
        lookup: &mut Vec<Value<'a>>,
    ) -> Result<(), Error>;

    // Provided method
    fn build(&self, dialect: DBImpl, lookup: &mut Vec<Value<'a>>) -> String { ... }
}
Expand description

Trait implementing constructing sql queries from a condition tree.

This trait auto implements build which has a simpler api from the more complex build_to_writer.

Required Methods§

Source

fn build_to_writer( &self, writer: &mut impl Write, dialect: DBImpl, lookup: &mut Vec<Value<'a>>, ) -> Result<(), Error>

This method is used to convert a condition to SQL without allocating a dedicated string.

Provided Methods§

Source

fn build(&self, dialect: DBImpl, lookup: &mut Vec<Value<'a>>) -> String

This method is used to convert a condition to SQL.

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§