pub struct PostgresGenerator;Implementations§
Trait Implementations§
Source§impl Default for PostgresGenerator
impl Default for PostgresGenerator
Source§impl SqlGenerator for PostgresGenerator
impl SqlGenerator for PostgresGenerator
Source§fn quote_identifier(&self, name: &str) -> String
fn quote_identifier(&self, name: &str) -> String
Quote an identifier (table or column name).
Source§fn placeholder(&self, index: usize) -> String
fn placeholder(&self, index: usize) -> String
Generate the parameter placeholder (e.g., $1, ?, @p1) for a given index.
Source§fn fuzzy_operator(&self) -> &str
fn fuzzy_operator(&self) -> &str
Get the fuzzy matching operator (ILIKE vs LIKE).
Source§fn bool_literal(&self, val: bool) -> String
fn bool_literal(&self, val: bool) -> String
Get the boolean literal (true/false vs 1/0).
Source§fn string_concat(&self, parts: &[&str]) -> String
fn string_concat(&self, parts: &[&str]) -> String
Generate string concatenation expression (e.g. ‘a’ || ‘b’ vs CONCAT(‘a’, ‘b’)).
fn limit_offset(&self, limit: Option<usize>, offset: Option<usize>) -> String
Source§fn json_access(&self, col: &str, path: &[&str]) -> String
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
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
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
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
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
fn json_value(&self, col: &str, path: &str) -> String
JSON_VALUE - extract scalar value at path (Postgres 17+, SQL/JSON standard)
Auto Trait Implementations§
impl Freeze for PostgresGenerator
impl RefUnwindSafe for PostgresGenerator
impl Send for PostgresGenerator
impl Sync for PostgresGenerator
impl Unpin for PostgresGenerator
impl UnwindSafe for PostgresGenerator
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more