sea_orm

Type Alias DbBackend

Source
pub type DbBackend = DatabaseBackend;
Expand description

The same as DatabaseBackend just shorter :)

Aliased Type§

enum DbBackend {
    MySql,
    Postgres,
    Sqlite,
}

Variants§

§

MySql

A MySQL backend

§

Postgres

A PostgreSQL backend

§

Sqlite

A SQLite backend

Implementations§

Source§

impl DbBackend

Source

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.

Source

pub fn build<S>(&self, statement: &S) -> Statement

Build an SQL Statement

Source

pub fn get_query_builder(&self) -> Box<dyn QueryBuilder>

A helper for building SQL queries

Source

pub fn support_returning(&self) -> bool

Check if the database supports RETURNING syntax on insert and update