pub struct DbPillarPool { /* private fields */ }Expand description
High-Concurrency Dual-Pool SQLite Manager.
Provides a dedicated single writer connection alongside an r2d2 multi-reader
connection pool configured with WAL mode, normal synchronous mode, and busy timeouts.
Implementations§
Source§impl DbPillarPool
impl DbPillarPool
Sourcepub fn new(pillar: &str, clm_root: &str) -> Result<Self>
pub fn new(pillar: &str, clm_root: &str) -> Result<Self>
Initializes a dual-pool manager for the given pillar database path.
Sourcepub fn writer(&self) -> Arc<Mutex<Connection>> ⓘ
pub fn writer(&self) -> Arc<Mutex<Connection>> ⓘ
Returns an Arc<Mutex<Connection>> handle to the dedicated writer connection.
Sourcepub fn reader(&self) -> Result<PooledConnection<SqliteConnectionManager>>
pub fn reader(&self) -> Result<PooledConnection<SqliteConnectionManager>>
Acquires a connection from the multi-reader pool without locking the writer.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for DbPillarPool
impl !UnwindSafe for DbPillarPool
impl Forget for DbPillarPool
impl Freeze for DbPillarPool
impl Send for DbPillarPool
impl Sync for DbPillarPool
impl Unpin for DbPillarPool
impl UnsafeUnpin for DbPillarPool
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