[][src]Trait rbatis_drivers::Driver

pub trait Driver: Sync + Send {
    fn connect(&self, url: &str) -> Result<Box<dyn Connection>>;
}

Represents database driver that can be shared between threads, and can therefore implement a connection pool

Required methods

fn connect(&self, url: &str) -> Result<Box<dyn Connection>>

Create a connection to the database. Note that connections are intended to be used in a single thread since most database connections are not thread-safe

Loading content...

Implementors

impl Driver for MySQLDriver[src]

impl Driver for PostgresDriver[src]

Loading content...