Skip to main content

SqlDialect

Trait SqlDialect 

Source
pub trait SqlDialect {
    // Required methods
    fn placeholder(output: &mut String, index: usize);
    fn column_type(column_type: ColumnType, output: &mut String);
    fn identity_primary_key(output: &mut String);
    fn timestamp_default(output: &mut String);

    // Provided methods
    fn identifier(identifier: &str, output: &mut String) { ... }
    fn constraint_name(
        _table: &str,
        _kind: &str,
        _columns: &[&str],
    ) -> Option<String> { ... }
    fn index_name(table: &str, position: usize) -> String { ... }
    fn datetime_collation(_output: &mut String) { ... }
    fn offset_without_limit(_output: &mut String) { ... }
}

Required Methods§

Source

fn placeholder(output: &mut String, index: usize)

Source

fn column_type(column_type: ColumnType, output: &mut String)

Source

fn identity_primary_key(output: &mut String)

Source

fn timestamp_default(output: &mut String)

Provided Methods§

Source

fn identifier(identifier: &str, output: &mut String)

Source

fn constraint_name( _table: &str, _kind: &str, _columns: &[&str], ) -> Option<String>

Source

fn index_name(table: &str, position: usize) -> String

Source

fn datetime_collation(_output: &mut String)

Source

fn offset_without_limit(_output: &mut String)

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§