mod generic;
pub use generic::GenericDialect;
pub trait Dialect {
fn name(&self) -> &'static str;
fn identifier_quote(&self) -> char {
'"'
}
fn string_escape(&self) -> &'static str {
"''"
}
fn parameter_placeholder(&self) -> &'static str {
"?"
}
fn supports_returning(&self) -> bool {
false
}
fn supports_upsert(&self) -> bool {
false
}
fn supports_limit_offset(&self) -> bool {
true
}
fn quote_identifier(&self, name: &str) -> String {
let quote = self.identifier_quote();
format!("{quote}{name}{quote}")
}
}