pub struct DatabaseStorageBackend { /* private fields */ }Expand description
Concrete implementation of StorageBackend backed by sochdb_storage::Database.
This bridges the query optimizer to the actual storage engine, enabling cost-based query plans to execute against real data.
§Thread Safety
Database is always Arc<Database> and is Send + Sync. This struct
holds an Arc clone and can be shared across threads.
§Transaction Management
Each query operation creates a read-only transaction for MVCC snapshot isolation. Transactions are automatically cleaned up on completion.
Implementations§
Trait Implementations§
Source§impl StorageBackend for DatabaseStorageBackend
impl StorageBackend for DatabaseStorageBackend
Source§fn table_scan(
&self,
table: &str,
columns: &[String],
predicate: Option<&str>,
) -> Result<Vec<HashMap<String, QuerySochValue>>>
fn table_scan( &self, table: &str, columns: &[String], predicate: Option<&str>, ) -> Result<Vec<HashMap<String, QuerySochValue>>>
Execute a full table scan
Source§fn primary_key_lookup(
&self,
table: &str,
key: &QuerySochValue,
) -> Result<Option<HashMap<String, QuerySochValue>>>
fn primary_key_lookup( &self, table: &str, key: &QuerySochValue, ) -> Result<Option<HashMap<String, QuerySochValue>>>
Execute a primary key lookup
Source§fn secondary_index_seek(
&self,
table: &str,
index: &str,
key: &QuerySochValue,
) -> Result<Vec<HashMap<String, QuerySochValue>>>
fn secondary_index_seek( &self, table: &str, index: &str, key: &QuerySochValue, ) -> Result<Vec<HashMap<String, QuerySochValue>>>
Execute a secondary index seek
Source§fn time_index_scan(
&self,
table: &str,
start_us: u64,
end_us: u64,
) -> Result<Vec<HashMap<String, QuerySochValue>>>
fn time_index_scan( &self, table: &str, start_us: u64, end_us: u64, ) -> Result<Vec<HashMap<String, QuerySochValue>>>
Execute a time range scan
Auto Trait Implementations§
impl !RefUnwindSafe for DatabaseStorageBackend
impl !UnwindSafe for DatabaseStorageBackend
impl Freeze for DatabaseStorageBackend
impl Send for DatabaseStorageBackend
impl Sync for DatabaseStorageBackend
impl Unpin for DatabaseStorageBackend
impl UnsafeUnpin for DatabaseStorageBackend
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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