pub struct DatabaseOps { /* private fields */ }Expand description
Database operations manager
Implementations§
Source§impl DatabaseOps
impl DatabaseOps
Sourcepub fn create_database(
&self,
name: &str,
params: StoreParams,
) -> Result<DatabaseMetadata>
pub fn create_database( &self, name: &str, params: StoreParams, ) -> Result<DatabaseMetadata>
Create a new database with the given parameters
Sourcepub fn delete_database(&self, name: &str) -> Result<()>
pub fn delete_database(&self, name: &str) -> Result<()>
Delete a database
Sourcepub fn list_databases(&self) -> Result<Vec<DatabaseMetadata>>
pub fn list_databases(&self) -> Result<Vec<DatabaseMetadata>>
List all databases
Sourcepub fn get_metadata(&self, name: &str) -> Result<DatabaseMetadata>
pub fn get_metadata(&self, name: &str) -> Result<DatabaseMetadata>
Get metadata for a specific database
Sourcepub fn compact_database(&self, name: &str) -> Result<CompactionStats>
pub fn compact_database(&self, name: &str) -> Result<CompactionStats>
Compact a database
Sourcepub fn repair_database(&self, name: &str) -> Result<RepairReport>
pub fn repair_database(&self, name: &str) -> Result<RepairReport>
Repair a database (check and fix corruption)
Sourcepub fn get_database_size(&self, name: &str) -> Result<u64>
pub fn get_database_size(&self, name: &str) -> Result<u64>
Get database size in bytes
Auto Trait Implementations§
impl Freeze for DatabaseOps
impl RefUnwindSafe for DatabaseOps
impl Send for DatabaseOps
impl Sync for DatabaseOps
impl Unpin for DatabaseOps
impl UnwindSafe for DatabaseOps
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> 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