pub enum DBPoolConn<'a> {
Mysql(PoolConnection<MySql>, &'a Box<dyn DataDecoder>),
Postgres(PoolConnection<Postgres>, &'a Box<dyn DataDecoder>),
Sqlite(PoolConnection<Sqlite>, &'a Box<dyn DataDecoder>),
Mssql(PoolConnection<Mssql>, &'a Box<dyn DataDecoder>),
}
Variants§
Mysql(PoolConnection<MySql>, &'a Box<dyn DataDecoder>)
Postgres(PoolConnection<Postgres>, &'a Box<dyn DataDecoder>)
Sqlite(PoolConnection<Sqlite>, &'a Box<dyn DataDecoder>)
Mssql(PoolConnection<Mssql>, &'a Box<dyn DataDecoder>)
Implementations§
Source§impl<'a> DBPoolConn<'a>
impl<'a> DBPoolConn<'a>
pub fn driver_type(&self) -> DriverType
pub fn make_query<'f, 's>(&'f self, sql: &'s str) -> Result<DBQuery<'s>>
pub fn check_alive(&self) -> Result<()>
pub async fn fetch<'q, T>(&mut self, sql: &'q str) -> Result<(T, usize)>where
T: DeserializeOwned,
pub async fn exec_sql(&mut self, sql: &str) -> Result<DBExecResult>
pub async fn fetch_parperd<T>(&mut self, sql: DBQuery<'_>) -> Result<(T, usize)>where
T: DeserializeOwned,
pub async fn exec_prepare(&mut self, sql: DBQuery<'_>) -> Result<DBExecResult>
pub async fn begin(self) -> Result<DBTx<'a>>
pub async fn ping(&mut self) -> Result<()>
pub async fn close(self) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
impl<'a> !Freeze for DBPoolConn<'a>
impl<'a> !RefUnwindSafe for DBPoolConn<'a>
impl<'a> Send for DBPoolConn<'a>
impl<'a> !Sync for DBPoolConn<'a>
impl<'a> Unpin for DBPoolConn<'a>
impl<'a> !UnwindSafe for DBPoolConn<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more