Skip to main content

Dialect

Trait Dialect 

Source
pub trait Dialect {
    // Required methods
    fn render_type(&self, ty: &DataType) -> String;
    fn quote_ident(&self, ident: &str) -> String;

    // Provided methods
    fn render_action(&self, action: ReferentialAction) -> &'static str { ... }
    fn terminator(&self) -> &'static str { ... }
}
Expand description

Dialect-specific rendering hooks.

Required Methods§

Source

fn render_type(&self, ty: &DataType) -> String

Render a DataType as a SQL type expression.

Source

fn quote_ident(&self, ident: &str) -> String

Quote an identifier (column / table name).

Provided Methods§

Source

fn render_action(&self, action: ReferentialAction) -> &'static str

Render a referential action verbatim.

Source

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

Statement terminator (almost always ;).

Implementors§