pub struct ThreadClonedMDB { /* private fields */ }Expand description
Thread-cloned read-only in-memory DB built from an authority file DB via SQLite backup API. Each thread lazily creates its own in-memory Connection (no cross-thread sharing).
Implementations§
Source§impl ThreadClonedMDB
impl ThreadClonedMDB
pub fn with_tls_conn<T, F: FnOnce(&Connection) -> KnowledgeResult<T>>( &self, f: F, ) -> KnowledgeResult<T>
pub fn query_fields( &self, sql: &str, params: &[DataField], ) -> KnowledgeResult<Vec<RowData>>
pub fn query_named_fields( &self, sql: &str, params: &[DataField], ) -> KnowledgeResult<RowData>
Trait Implementations§
Source§impl Clone for ThreadClonedMDB
impl Clone for ThreadClonedMDB
Source§fn clone(&self) -> ThreadClonedMDB
fn clone(&self) -> ThreadClonedMDB
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl DBQuery for ThreadClonedMDB
impl DBQuery for ThreadClonedMDB
fn query(&self, sql: &str) -> KnowledgeResult<Vec<RowData>>
fn query_row(&self, sql: &str) -> KnowledgeResult<RowData>
fn query_row_params<P: Params>( &self, sql: &str, params: P, ) -> KnowledgeResult<RowData>
fn query_row_tdos<P: Params>( &self, _sql: &str, _params: &[DataField; 2], ) -> KnowledgeResult<RowData>
Source§impl ProviderExecutor for ThreadClonedMDB
impl ProviderExecutor for ThreadClonedMDB
fn query(&self, sql: &str) -> KnowledgeResult<Vec<RowData>>
fn query_fields( &self, sql: &str, params: &[DataField], ) -> KnowledgeResult<Vec<RowData>>
fn query_row(&self, sql: &str) -> KnowledgeResult<RowData>
fn query_named_fields( &self, sql: &str, params: &[DataField], ) -> KnowledgeResult<RowData>
Auto Trait Implementations§
impl Freeze for ThreadClonedMDB
impl RefUnwindSafe for ThreadClonedMDB
impl Send for ThreadClonedMDB
impl Sync for ThreadClonedMDB
impl Unpin for ThreadClonedMDB
impl UnsafeUnpin for ThreadClonedMDB
impl UnwindSafe for ThreadClonedMDB
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