pub struct StructuredSingleDb { /* private fields */ }Implementations§
Source§impl StructuredSingleDb
impl StructuredSingleDb
pub fn open(config: Config) -> Result<Self>
pub fn db(&self) -> &SingleDb
pub fn current_schema(&self) -> StructuredSchema
Sourcepub fn register_schema_transform<F, T>(
&self,
transform_type: impl Into<String>,
factory: F,
) -> Result<()>
pub fn register_schema_transform<F, T>( &self, transform_type: impl Into<String>, factory: F, ) -> Result<()>
Register a factory for raw single-column transform specifications.
pub fn update_schema(&mut self) -> StructuredSchemaBuilder<'_, Self>
Sourcepub fn new_priority_queue<'a>(
&'a mut self,
name: impl Into<String>,
) -> Result<PriorityQueue<'a>>
pub fn new_priority_queue<'a>( &'a mut self, name: impl Into<String>, ) -> Result<PriorityQueue<'a>>
Creates a structured priority queue backed by a dedicated column family.
The returned queue uses the same PriorityQueue API as sharded StructuredDb, and the
queue itself owns the backend-specific dispatch. This keeps upper layers from having to
special-case StructuredSingleDb when offering, scanning, or advancing queue items.
Sourcepub fn get_priority_queue<'a>(
&'a self,
name: impl Into<String>,
) -> Result<PriorityQueue<'a>>
pub fn get_priority_queue<'a>( &'a self, name: impl Into<String>, ) -> Result<PriorityQueue<'a>>
Opens an existing structured priority queue by name.
The target column family must exist, be marked as a priority queue, and contain exactly one bytes column.
Sourcepub fn get_or_new_priority_queue<'a>(
&'a mut self,
name: impl Into<String>,
) -> Result<PriorityQueue<'a>>
pub fn get_or_new_priority_queue<'a>( &'a mut self, name: impl Into<String>, ) -> Result<PriorityQueue<'a>>
Opens an existing structured priority queue or creates it on first use.
If a same-named column family already exists, it must already be a valid priority queue family.
Source§impl StructuredSingleDb
impl StructuredSingleDb
pub fn reload_schema(&mut self) -> Result<()>
pub fn apply_schema( &mut self, structured_schema: StructuredSchema, ) -> Result<StructuredSchema>
pub fn put<K, V>( &self, bucket: u16, key: K, column: u16, value: V, ) -> Result<()>
pub fn put_with_options<K, V>( &self, bucket: u16, key: K, column: u16, value: V, options: &StructuredWriteOptions, ) -> Result<()>
pub fn merge<K, V>( &self, bucket: u16, key: K, column: u16, value: V, ) -> Result<()>
pub fn merge_with_options<K, V>( &self, bucket: u16, key: K, column: u16, value: V, options: &StructuredWriteOptions, ) -> Result<()>
pub fn delete<K>(&self, bucket: u16, key: K, column: u16) -> Result<()>
pub fn delete_with_options<K>( &self, bucket: u16, key: K, column: u16, options: &StructuredWriteOptions, ) -> Result<()>
pub fn new_write_batch(&self) -> StructuredWriteBatch
pub fn write_batch(&self, batch: StructuredWriteBatch) -> Result<()>
pub fn write_batch_with_options( &self, batch: StructuredWriteBatch, options: &StructuredWriteOptions, ) -> Result<()>
pub fn get<K>( &self, bucket: u16, key: K, ) -> Result<Option<Vec<Option<StructuredColumnValue>>>>
pub fn multi_get<K>( &self, keys: &[(u16, K)], ) -> Result<Vec<Option<Vec<Option<StructuredColumnValue>>>>>
pub fn multi_get_with_options<K>( &self, keys: &[(u16, K)], options: &StructuredReadOptions, ) -> Result<Vec<Option<Vec<Option<StructuredColumnValue>>>>>
pub fn get_with_options<K>( &self, bucket: u16, key: K, options: &StructuredReadOptions, ) -> Result<Option<Vec<Option<StructuredColumnValue>>>>
pub fn scan( &self, bucket: u16, range: Range<&[u8]>, ) -> Result<StructuredDbIterator>
pub fn scan_with_options( &self, bucket: u16, range: Range<&[u8]>, options: &StructuredScanOptions, ) -> Result<StructuredDbIterator>
pub fn snapshot(&self) -> Result<u64>
Sourcepub fn switch_memtable_type(
&self,
memtable_type: MemtableType,
flush_current: bool,
) -> Result<()>
pub fn switch_memtable_type( &self, memtable_type: MemtableType, flush_current: bool, ) -> Result<()>
Change the memtable implementation for future rotations.
flush_current = false leaves the active memtable untouched; true rotates a non-empty
active memtable now through the normal flush path.
Sourcepub fn load_readonly_files_to_primary(&self) -> Result<usize>
pub fn load_readonly_files_to_primary(&self) -> Result<usize>
Mark all currently referenced READONLY files for asynchronous loading into primary storage.
pub fn snapshot_with_callback<F>(&self, callback: F) -> Result<u64>
pub fn retain_snapshot(&self, global_snapshot_id: u64) -> Result<bool>
pub fn expire_snapshot(&self, global_snapshot_id: u64) -> Result<bool>
pub fn list_snapshots(&self) -> Result<Vec<GlobalSnapshotManifest>>
pub fn set_time(&self, next: u32)
pub fn close(&self) -> Result<()>
Auto Trait Implementations§
impl !Freeze for StructuredSingleDb
impl !RefUnwindSafe for StructuredSingleDb
impl !UnwindSafe for StructuredSingleDb
impl Send for StructuredSingleDb
impl Sync for StructuredSingleDb
impl Unpin for StructuredSingleDb
impl UnsafeUnpin for StructuredSingleDb
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
impl<T> ErasedDestructor for Twhere
T: 'static,
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> ⓘ
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> ⓘ
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