Struct rbatis_core::db::db_adapter::DBTx
source · [−]pub struct DBTx<'a> {
pub driver_type: DriverType,
pub conn: Option<DBPoolConn<'a>>,
pub done: bool,
}
Fields
driver_type: DriverType
conn: Option<DBPoolConn<'a>>
done: bool
is tx done?
Implementations
sourceimpl<'a> DBTx<'a>
impl<'a> DBTx<'a>
pub fn make_query<'f, 's>(&'f self, sql: &'s str) -> Result<DBQuery<'s>>
pub fn is_done(&self) -> bool
pub fn take_conn(self) -> Option<DBPoolConn<'a>>
pub fn get_conn_mut(&mut self) -> Result<&mut DBPoolConn<'a>>
pub async fn begin(&mut self) -> Result<()>
pub async fn commit(&mut self) -> Result<()>
pub async fn rollback(&mut self) -> Result<()>
pub async fn fetch<'q, T>(&mut self, sql: &'q str) -> Result<(T, usize)> where
T: DeserializeOwned,
pub async fn fetch_parperd<'q, T>(
&mut self,
sql: DBQuery<'q>
) -> Result<(T, usize)> where
T: DeserializeOwned,
pub async fn exec_sql(&mut self, sql: &str) -> Result<DBExecResult>
pub async fn exec_prepare(&mut self, sql: DBQuery<'_>) -> Result<DBExecResult>
Trait Implementations
Auto Trait Implementations
impl<'a> !RefUnwindSafe for DBTx<'a>
impl<'a> Send for DBTx<'a>
impl<'a> !Sync for DBTx<'a>
impl<'a> Unpin for DBTx<'a>
impl<'a> !UnwindSafe for DBTx<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more