pub type DbBackend = DatabaseBackend;Expand description
A shorthand for DatabaseBackend.
Aliased Type§
pub enum DbBackend {
MySql,
Postgres,
Sqlite,
}Variants§
Implementations§
Source§impl DbBackend
impl DbBackend
Sourcepub fn is_prefix_of(self, base_url: &str) -> bool
pub fn is_prefix_of(self, base_url: &str) -> bool
Check if the URI is the same as the specified database backend. Returns true if they match.
§Panics
Panics if base_url cannot be parsed as Url.
Sourcepub fn build<S>(&self, statement: &S) -> Statementwhere
S: StatementBuilder,
pub fn build<S>(&self, statement: &S) -> Statementwhere
S: StatementBuilder,
Build an SQL Statement
Sourcepub fn support_returning(&self) -> bool
pub fn support_returning(&self) -> bool
Check if the database supports RETURNING syntax on insert and update
Sourcepub fn boolean_value(&self, boolean: bool) -> Value
pub fn boolean_value(&self, boolean: bool) -> Value
A getter for database dependent boolean value