DialectExt

Trait DialectExt 

Source
pub trait DialectExt {
    // Required method
    fn render_placeholder(&self, index: usize) -> Cow<'static, str>;
}
Expand description

Extension trait for Dialect-specific placeholder rendering

Required Methods§

Source

fn render_placeholder(&self, index: usize) -> Cow<'static, str>

Renders a placeholder for this dialect with the given 1-based index.

Returns Cow::Borrowed("?") for SQLite/MySQL (zero allocation), Cow::Owned for PostgreSQL numbered placeholders.

§Examples
  • PostgreSQL: $1, $2, $3
  • SQLite/MySQL: ?

Implementors§