pub struct Postgres;Expand description
Postgres dialect.
Trait Implementations§
Source§impl Dialect for Postgres
impl Dialect for Postgres
Source§fn param(&self, idx: usize) -> String
fn param(&self, idx: usize) -> String
Format a parameter placeholder (e.g.,
$1 for Postgres, ?1 for SQLite).Source§fn regex_op(&self) -> &'static str
fn regex_op(&self) -> &'static str
Format the regex operator and pattern.
Returns (operator,
should_transform_pattern).Source§fn in_clause(
&self,
field: &str,
values: &[Value],
start_idx: usize,
) -> (String, Vec<Value>)
fn in_clause( &self, field: &str, values: &[Value], start_idx: usize, ) -> (String, Vec<Value>)
Format an IN clause with multiple values.
Returns the SQL fragment (e.g.,
= ANY($1) or IN (?1, ?2)).Source§fn not_in_clause(
&self,
field: &str,
values: &[Value],
start_idx: usize,
) -> (String, Vec<Value>)
fn not_in_clause( &self, field: &str, values: &[Value], start_idx: usize, ) -> (String, Vec<Value>)
Format a NOT IN clause.
Source§fn supports_ilike(&self) -> bool
fn supports_ilike(&self) -> bool
Whether ILIKE is supported natively.
Source§fn starts_with_clause(&self, field: &str, idx: usize) -> String
fn starts_with_clause(&self, field: &str, idx: usize) -> String
Format a STARTS WITH clause (e.g.,
LIKE $1 || '%' or LIKE ?1 || '%').impl Copy for Postgres
Auto Trait Implementations§
impl Freeze for Postgres
impl RefUnwindSafe for Postgres
impl Send for Postgres
impl Sync for Postgres
impl Unpin for Postgres
impl UnwindSafe for Postgres
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