Skip to main content

Builder

Struct Builder 

Source
struct Builder {
    dialect: Dialect,
    parameters: Vec<Value>,
    binary_parameters: BTreeSet<usize>,
}

Fields§

§dialect: Dialect§parameters: Vec<Value>§binary_parameters: BTreeSet<usize>

Implementations§

Source§

impl Builder

Source

fn new(dialect: Dialect) -> Self

Starts one statement with an empty parameter list.

Source

fn name(&self, value: &str) -> Result<String, DatabaseError>

Quotes a validated logical identifier using the target SQL dialect.

Source

fn bind(&mut self, value: Value) -> String

Appends one bind value without interpolating it into SQL text.

Source

fn bind_field( &mut self, field: &Field, value: Value, ) -> Result<String, DatabaseError>

Encodes a logical field value before binding it to the physical dialect.

Source

fn bind_named_field( &mut self, declaration: &Entity, field: &str, value: Value, ) -> Result<String, DatabaseError>

Finds the declared field type for a parameterized comparison.

Source

fn comparison_name( &self, declaration: &Entity, name: &str, ) -> Result<String, DatabaseError>

Resolves a comparison key without changing the projected app field.

Source

fn filter( &mut self, declaration: &Entity, predicate: &Predicate, ) -> Result<String, DatabaseError>

Lowers a validated predicate recursively while preserving parameter order.

Source

fn compare( &mut self, declaration: &Entity, field: &str, operator: &str, value: &Value, ) -> Result<String, DatabaseError>

Handles null equality with SQL null semantics.

Source

fn combine( &mut self, declaration: &Entity, parts: &[Predicate], separator: &str, ) -> Result<String, DatabaseError>

Joins a bounded group of nested predicates.

Source

fn finish(self, sql: String) -> Statement

Finishes a statement without altering its bind order.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.