pub enum MiddlewarePoolConnection {
Postgres(Object),
Sqlite(Object),
}
Variants§
Implementations§
Source§impl MiddlewarePoolConnection
impl MiddlewarePoolConnection
pub async fn interact_async<F, Fut>(
&mut self,
func: F,
) -> Result<Fut::Output, SqlMiddlewareDbError>where
F: FnOnce(AnyConnWrapper<'_>) -> Fut + Send + 'static,
Fut: Future<Output = Result<(), SqlMiddlewareDbError>> + Send + 'static,
pub async fn interact_sync<F, R>(&self, f: F) -> Result<R, SqlMiddlewareDbError>
Trait Implementations§
Source§impl AsyncDatabaseExecutor for MiddlewarePoolConnection
impl AsyncDatabaseExecutor for MiddlewarePoolConnection
Source§fn execute_batch<'life0, 'life1, 'async_trait>(
&'life0 mut self,
query: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), SqlMiddlewareDbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn execute_batch<'life0, 'life1, 'async_trait>(
&'life0 mut self,
query: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), SqlMiddlewareDbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Executes a batch of SQL queries within a transaction by delegating to the specific database module.
Source§fn execute_select<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
query: &'life1 str,
params: &'life2 [RowValues],
) -> Pin<Box<dyn Future<Output = Result<ResultSet, SqlMiddlewareDbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn execute_select<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
query: &'life1 str,
params: &'life2 [RowValues],
) -> Pin<Box<dyn Future<Output = Result<ResultSet, SqlMiddlewareDbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Executes a single SELECT statement and returns the result set.
Source§fn execute_dml<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
query: &'life1 str,
params: &'life2 [RowValues],
) -> Pin<Box<dyn Future<Output = Result<usize, SqlMiddlewareDbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn execute_dml<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
query: &'life1 str,
params: &'life2 [RowValues],
) -> Pin<Box<dyn Future<Output = Result<usize, SqlMiddlewareDbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Executes a single DML statement (INSERT, UPDATE, DELETE, etc.) and returns the number of rows affected.
Auto Trait Implementations§
impl Freeze for MiddlewarePoolConnection
impl !RefUnwindSafe for MiddlewarePoolConnection
impl Send for MiddlewarePoolConnection
impl Sync for MiddlewarePoolConnection
impl Unpin for MiddlewarePoolConnection
impl !UnwindSafe for MiddlewarePoolConnection
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