use std::fmt::Debug;
use std::path::Path;
#[cfg(feature = "rusqlite")]
pub mod rusqlite;
#[cfg(feature = "diesel")]
pub mod diesel;
pub trait Driver: 'static + Send + Sync + Debug {
#[cfg(feature = "watcher")]
type Connection: sqlite_watcher::connection::SqlExecutorMut<Error = Self::Error>;
#[cfg(not(feature = "watcher"))]
type Connection;
type Error: std::error::Error;
type ConnectionError: std::error::Error;
type ConnectionRef<'c>;
fn new_read_connection(path: &Path) -> Result<Self::Connection, Self::ConnectionError>;
fn new_write_connection(path: &Path) -> Result<Self::Connection, Self::ConnectionError>;
fn begin_transaction(connection: &mut Self::Connection, sql: &str) -> Result<(), Self::Error>;
fn commit_transaction(connection: &mut Self::Connection) -> Result<(), Self::Error>;
fn rollback_transaction(connection: &mut Self::Connection) -> Result<(), Self::Error>;
}
pub trait DriverMutConnectionDeref: Driver {}