pub enum Dialect {
Postgres,
Mysql,
Sqlite,
}Expand description
Target database dialect for placeholder syntax.
Variants§
Implementations§
Source§impl Dialect
impl Dialect
Sourcepub fn placeholder(&self, index: usize) -> String
pub fn placeholder(&self, index: usize) -> String
Format a placeholder for the given 1-based parameter index.
Sourcepub fn supports_numbered_placeholders(&self) -> bool
pub fn supports_numbered_placeholders(&self) -> bool
Whether this dialect uses numbered placeholders ($1, ?1) vs positional (?).
Numbered dialects (Postgres, SQLite) support alphabetical parameter ordering and deduplication. Positional dialects (MySQL) use document-order placeholders.
Trait Implementations§
impl Copy for Dialect
impl Eq for Dialect
impl StructuralPartialEq for Dialect
Auto Trait Implementations§
impl Freeze for Dialect
impl RefUnwindSafe for Dialect
impl Send for Dialect
impl Sync for Dialect
impl Unpin for Dialect
impl UnsafeUnpin for Dialect
impl UnwindSafe for Dialect
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