Skip to main content

Dialect

Trait Dialect 

Source
pub trait Dialect: Send + Sync {
    // Required methods
    fn name(&self) -> &'static str;
    fn identifier_quote(&self) -> char;
    fn placeholder(&self, index: usize) -> String;
    fn supports_returning(&self) -> bool;
    fn supports_on_conflict(&self) -> bool;

    // Provided methods
    fn supports_update_from(&self) -> bool { ... }
    fn supports_select_row_locking(&self) -> bool { ... }
    fn supports_table_locking(&self) -> bool { ... }
}

Required Methods§

Source

fn name(&self) -> &'static str

Source

fn identifier_quote(&self) -> char

Source

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

Source

fn supports_returning(&self) -> bool

Source

fn supports_on_conflict(&self) -> bool

Provided Methods§

Source

fn supports_update_from(&self) -> bool

Whether the dialect accepts UPDATE ... FROM ....

Source

fn supports_select_row_locking(&self) -> bool

Whether the dialect accepts the typed SELECT row-locking clause.

Source

fn supports_table_locking(&self) -> bool

Whether the dialect accepts PostgreSQL-style typed table locks.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§