pub struct SqlBridge { /* private fields */ }Expand description
Bridges ConnectionPool to khive_storage::SqlAccess.
Dispatches based on whether the pool is file-backed or in-memory:
- File-backed: standalone connections per reader/writer/tx (high concurrency).
- In-memory: pool-backed connections per query (single shared connection).
Implementations§
Trait Implementations§
Source§impl SqlAccess for SqlBridge
impl SqlAccess for SqlBridge
fn reader<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = StorageResult<Box<dyn SqlReader>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn writer<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = StorageResult<Box<dyn SqlWriter>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn begin_tx<'life0, 'async_trait>(
&'life0 self,
options: SqlTxOptions,
) -> Pin<Box<dyn Future<Output = StorageResult<Box<dyn SqlTransaction>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Auto Trait Implementations§
impl Freeze for SqlBridge
impl !RefUnwindSafe for SqlBridge
impl Send for SqlBridge
impl Sync for SqlBridge
impl Unpin for SqlBridge
impl UnsafeUnpin for SqlBridge
impl !UnwindSafe for SqlBridge
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