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_fields_with_scope( &self, sql: &str, params: &[DataField], ) -> KnowledgeResult<Vec<RowData>>
pub fn query_named_fields( &self, sql: &str, params: &[DataField], ) -> KnowledgeResult<RowData>
pub fn query_named_fields_with_scope( &self, sql: &str, params: &[DataField], ) -> KnowledgeResult<RowData>
pub fn query_with_scope(&self, sql: &str) -> KnowledgeResult<Vec<RowData>>
pub fn query_row_with_scope(&self, sql: &str) -> 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>
fn query_async<'life0, 'life1, 'async_trait>(
&'life0 self,
sql: &'life1 str,
) -> Pin<Box<dyn Future<Output = KnowledgeResult<Vec<RowData>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn query_fields_async<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
sql: &'life1 str,
params: &'life2 [DataField],
) -> Pin<Box<dyn Future<Output = KnowledgeResult<Vec<RowData>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn query_row_async<'life0, 'life1, 'async_trait>(
&'life0 self,
sql: &'life1 str,
) -> Pin<Box<dyn Future<Output = KnowledgeResult<RowData>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn query_named_fields_async<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
sql: &'life1 str,
params: &'life2 [DataField],
) -> Pin<Box<dyn Future<Output = KnowledgeResult<RowData>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more