Struct rbatis::executor::RBatisTxExecutorGuard
source · [−]pub struct RBatisTxExecutorGuard<'a> {
pub tx: Option<RBatisTxExecutor<'a>>,
pub callback: Box<dyn FnMut(RBatisTxExecutor<'a>) + Send + 'a>,
}
Fields
tx: Option<RBatisTxExecutor<'a>>
callback: Box<dyn FnMut(RBatisTxExecutor<'a>) + Send + 'a>
Implementations
sourceimpl<'a, 'b> RBatisTxExecutorGuard<'b>
impl<'a, 'b> RBatisTxExecutorGuard<'b>
Methods from Deref<Target = RBatisTxExecutor<'a>>
pub fn as_executor(&'a mut self) -> RbatisExecutor<'a, 'b>
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_page<T>(
&self,
sql: &str,
args: Vec<Bson>,
page_request: &dyn IPageRequest
) -> Result<Page<T>> where
T: DeserializeOwned + Serialize + Send + Sync,
Methods from Deref<Target = DBTx<'a>>
pub fn make_query(&'f self, sql: &'s str) -> Result<DBQuery<'s>, Error>
pub fn is_done(&self) -> bool
pub fn get_conn_mut(&mut self) -> Result<&mut DBPoolConn<'a>, Error>
pub async fn begin(&'_ mut self) -> Result<(), Error>
pub async fn commit(&'_ mut self) -> Result<(), Error>
pub async fn rollback(&'_ mut self) -> Result<(), Error>
pub async fn fetch<T>(&'_ mut self, sql: &'q str) -> Result<(T, usize), Error> where
T: DeserializeOwned,
pub async fn fetch_parperd<T>(
&'_ mut self,
sql: DBQuery<'q>
) -> Result<(T, usize), Error> where
T: DeserializeOwned,
pub async fn exec_sql(&'_ mut self, sql: &'_ str) -> Result<DBExecResult, Error>
pub async fn exec_prepare(
&'_ mut self,
sql: DBQuery<'_>
) -> Result<DBExecResult, Error>
Trait Implementations
sourceimpl Debug for RBatisTxExecutorGuard<'_>
impl Debug for RBatisTxExecutorGuard<'_>
sourceimpl<'a> Deref for RBatisTxExecutorGuard<'a>
impl<'a> Deref for RBatisTxExecutorGuard<'a>
type Target = RBatisTxExecutor<'a>
type Target = RBatisTxExecutor<'a>
The resulting type after dereferencing.
sourceimpl<'a> DerefMut for RBatisTxExecutorGuard<'a>
impl<'a> DerefMut for RBatisTxExecutorGuard<'a>
sourceimpl Drop for RBatisTxExecutorGuard<'_>
impl Drop for RBatisTxExecutorGuard<'_>
sourceimpl<'r, 'inner> From<&'r mut RBatisTxExecutorGuard<'inner>> for RbatisExecutor<'r, 'inner>
impl<'r, 'inner> From<&'r mut RBatisTxExecutorGuard<'inner>> for RbatisExecutor<'r, 'inner>
sourcefn from(arg: &'r mut RBatisTxExecutorGuard<'inner>) -> Self
fn from(arg: &'r mut RBatisTxExecutorGuard<'inner>) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl<'a> !RefUnwindSafe for RBatisTxExecutorGuard<'a>
impl<'a> Send for RBatisTxExecutorGuard<'a>
impl<'a> !Sync for RBatisTxExecutorGuard<'a>
impl<'a> Unpin for RBatisTxExecutorGuard<'a>
impl<'a> !UnwindSafe for RBatisTxExecutorGuard<'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