Enum rbatis::executor::RbatisExecutor
source · [−]pub enum RbatisExecutor<'r, 'inner> where
'inner: 'r, {
RB(&'r Rbatis),
Conn(&'r mut RBatisConnExecutor<'inner>),
TX(&'r mut RBatisTxExecutor<'inner>),
TxGuard(&'r mut RBatisTxExecutorGuard<'inner>),
}
Expand description
the rbatis Containers for transactions, connections, and ontologies for example:
&mut tx.as_executor() &mut conn.as_executor() &mut guard.as_executor() (&rb).into() (&mut tx).into() (&mut conn).into() (&mut guard).into()
Variants
RB(&'r Rbatis)
Conn(&'r mut RBatisConnExecutor<'inner>)
TX(&'r mut RBatisTxExecutor<'inner>)
TxGuard(&'r mut RBatisTxExecutorGuard<'inner>)
Implementations
sourceimpl RbatisExecutor<'_, '_>
impl RbatisExecutor<'_, '_>
pub async fn fetch_page<T>(
&mut self,
sql: &str,
args: Vec<Bson>,
page_request: &dyn IPageRequest
) -> Result<Page<T>> where
T: DeserializeOwned + Serialize + Send + Sync,
pub async fn exec(
&mut self,
sql: &str,
args: Vec<Bson>
) -> Result<DBExecResult, Error>
pub async fn fetch<T>(&mut self, sql: &str, args: Vec<Bson>) -> Result<T, Error> where
T: DeserializeOwned,
Trait Implementations
sourceimpl<'r, 'inner> Debug for RbatisExecutor<'r, 'inner> where
'inner: 'r,
impl<'r, 'inner> Debug for RbatisExecutor<'r, 'inner> where
'inner: 'r,
sourceimpl<'r, 'inner> From<&'r Rbatis> for RbatisExecutor<'r, 'inner>
impl<'r, 'inner> From<&'r Rbatis> for RbatisExecutor<'r, 'inner>
sourceimpl<'r, 'inner> From<&'r mut RBatisConnExecutor<'inner>> for RbatisExecutor<'r, 'inner>
impl<'r, 'inner> From<&'r mut RBatisConnExecutor<'inner>> for RbatisExecutor<'r, 'inner>
sourcefn from(arg: &'r mut RBatisConnExecutor<'inner>) -> Self
fn from(arg: &'r mut RBatisConnExecutor<'inner>) -> Self
Performs the conversion.
sourceimpl<'r, 'inner> From<&'r mut RBatisTxExecutor<'inner>> for RbatisExecutor<'r, 'inner>
impl<'r, 'inner> From<&'r mut RBatisTxExecutor<'inner>> for RbatisExecutor<'r, 'inner>
sourcefn from(arg: &'r mut RBatisTxExecutor<'inner>) -> Self
fn from(arg: &'r mut RBatisTxExecutor<'inner>) -> Self
Performs the conversion.
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
Performs the conversion.
sourceimpl<'r, 'inner> RbatisRef for RbatisExecutor<'r, 'inner>
impl<'r, 'inner> RbatisRef for RbatisExecutor<'r, 'inner>
fn get_rbatis(&self) -> &Rbatis
fn driver_type(&self) -> Result<DriverType>
Auto Trait Implementations
impl<'r, 'inner> !RefUnwindSafe for RbatisExecutor<'r, 'inner>
impl<'r, 'inner> Send for RbatisExecutor<'r, 'inner>
impl<'r, 'inner> !Sync for RbatisExecutor<'r, 'inner>
impl<'r, 'inner> Unpin for RbatisExecutor<'r, 'inner> where
'inner: 'r,
impl<'r, 'inner> !UnwindSafe for RbatisExecutor<'r, 'inner>
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