Skip to main content

ConditionsTarget

Trait ConditionsTarget 

Source
pub trait ConditionsTarget {
    // Required methods
    fn write_where(&mut self);
    fn write_conditions<C: Columns + ?Sized, M>(
        &mut self,
        conditions: Conditions<M>,
        junction: Junction,
    );
}
Expand description

A query that filter conditions can be written into: a WHERE clause.

Required Methods§

Source

fn write_where(&mut self)

Start a WHERE clause, before its conditions.

Source

fn write_conditions<C: Columns + ?Sized, M>( &mut self, conditions: Conditions<M>, junction: Junction, )

Write the conditions of the model M, joined by junction, each comparing the column C stores its domain field in.

Values are bound with their own SQL type; the LIKE operators bind an escaped pattern (… LIKE ? ESCAPE '!'), so user input matches literally.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl ConditionsTarget for DeleteStatement

Source§

fn write_where(&mut self)

Nothing: cond_where writes the WHERE itself.

Source§

fn write_conditions<C: Columns + ?Sized, M>( &mut self, conditions: Conditions<M>, junction: Junction, )

Source§

impl ConditionsTarget for SelectStatement

Source§

fn write_where(&mut self)

Nothing: cond_where writes the WHERE itself.

Source§

fn write_conditions<C: Columns + ?Sized, M>( &mut self, conditions: Conditions<M>, junction: Junction, )

Source§

impl ConditionsTarget for UpdateStatement

Source§

fn write_where(&mut self)

Nothing: cond_where writes the WHERE itself.

Source§

fn write_conditions<C: Columns + ?Sized, M>( &mut self, conditions: Conditions<M>, junction: Junction, )

Implementors§