SqliteGenerator

Struct SqliteGenerator 

Source
pub struct SqliteGenerator;

Trait Implementations§

Source§

impl SqlGenerator for SqliteGenerator

Source§

fn quote_identifier(&self, id: &str) -> String

Quote an identifier (table or column name).
Source§

fn placeholder(&self, _index: usize) -> String

Generate the parameter placeholder (e.g., $1, ?, @p1) for a given index.
Source§

fn fuzzy_operator(&self) -> &str

Get the fuzzy matching operator (ILIKE vs LIKE).
Source§

fn bool_literal(&self, val: bool) -> String

Get the boolean literal (true/false vs 1/0).
Source§

fn string_concat(&self, parts: &[&str]) -> String

Generate string concatenation expression (e.g. ‘a’ || ‘b’ vs CONCAT(‘a’, ‘b’)).
Source§

fn limit_offset(&self, limit: Option<usize>, offset: Option<usize>) -> String

Source§

fn json_access(&self, col: &str, path: &[&str]) -> String

Generate JSON access syntax. path components are the keys to traverse. Default implementation returns “col”.“key1”.“key2” (Standard SQL composite).
Source§

fn json_contains(&self, col: &str, value: &str) -> String

Generate JSON/Array contains expression. Default implementation returns Postgres-compatible col @> value.
Source§

fn json_key_exists(&self, col: &str, key: &str) -> String

Generate JSON key exists expression. Default implementation returns Postgres-compatible col ? 'key'.
Source§

fn json_exists(&self, col: &str, path: &str) -> String

JSON_EXISTS - check if path exists in JSON (Postgres 17+, SQL/JSON standard)
Source§

fn json_query(&self, col: &str, path: &str) -> String

JSON_QUERY - extract JSON object/array at path (Postgres 17+, SQL/JSON standard)
Source§

fn json_value(&self, col: &str, path: &str) -> String

JSON_VALUE - extract scalar value at path (Postgres 17+, SQL/JSON standard)
Source§

fn in_array(&self, col: &str, value: &str) -> String

Generate IN array check (col IN value) Default: Postgres-style col = ANY(value) for array params
Source§

fn not_in_array(&self, col: &str, value: &str) -> String

Generate NOT IN array check (col NOT IN value) Default: Postgres-style col != ALL(value) for array params

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, 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.