Trait butane_core::db::Backend

source ·
pub trait Backend {
    // Required methods
    fn name(&self) -> &'static str;
    fn create_migration_sql(
        &self,
        current: &ADB,
        ops: Vec<Operation>
    ) -> Result<String>;
    fn connect(&self, conn_str: &str) -> Result<Connection>;
}
Expand description

Database backend. A boxed implementation can be returned by name via get_backend.

Required Methods§

source

fn name(&self) -> &'static str

source

fn create_migration_sql( &self, current: &ADB, ops: Vec<Operation> ) -> Result<String>

source

fn connect(&self, conn_str: &str) -> Result<Connection>

Trait Implementations§

source§

impl Backend for Box<dyn Backend>

source§

fn name(&self) -> &'static str

source§

fn create_migration_sql( &self, current: &ADB, ops: Vec<Operation> ) -> Result<String>

source§

fn connect(&self, conn_str: &str) -> Result<Connection>

Implementations on Foreign Types§

source§

impl Backend for Box<dyn Backend>

source§

fn name(&self) -> &'static str

source§

fn create_migration_sql( &self, current: &ADB, ops: Vec<Operation> ) -> Result<String>

source§

fn connect(&self, conn_str: &str) -> Result<Connection>

Implementors§