Skip to main content

SQLiteQueryBuilder

Struct SQLiteQueryBuilder 

Source
pub struct SQLiteQueryBuilder {
    pub sql: String,
    /* private fields */
}
Expand description

A QueryBuilder that implements SQLite’s specific escaping rules.

Fields§

§sql: String

Implementations§

Source§

impl SQLiteQueryBuilder

Source

pub fn new() -> Self

Source

pub fn with_prefix(prefix: String) -> Self

Source

pub fn set_dialect(&mut self, dialect: Dialect)

Generate SQL for dialect (identifiers, and the few fragments that differ). The default is SQLite.

Trait Implementations§

Source§

impl Default for SQLiteQueryBuilder

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl QueryBuilder for SQLiteQueryBuilder

Source§

fn push_bind_param(&mut self, name: &str) -> BuildQueryResult

Our bind parameters will be interleaved with pushed TypedValue instances. That means we need to use named parameters, not positional parameters. The name argument to this method is expected to be alphanumeric. If not, this method returns an InvalidParameterName error result. Callers should make sure that the name doesn’t overlap with generated parameter names. If it does, BindParamCouldBeGenerated is the error.

Source§

fn dialect(&self) -> Dialect

The SQL dialect being generated. SQLite unless the builder was told otherwise; fragments branch on it only where DuckDB differs.
Source§

fn push_sql(&mut self, sql: &str)

Source§

fn push_identifier(&mut self, identifier: &str) -> BuildQueryResult

Source§

fn push_typed_value(&mut self, value: &TypedValue) -> BuildQueryResult

Source§

fn finish(self) -> SQLQuery

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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.