Type Alias rocksdb::DBWithThreadMode
source · pub type DBWithThreadMode<T> = DBCommon<T, DBWithThreadModeInner>;
Expand description
A type alias to RocksDB database.
See crate level documentation for a simple usage example.
See DBCommon
for full list of methods.
Aliased Type§
struct DBWithThreadMode<T> { /* private fields */ }
Implementations§
source§impl<T: ThreadMode> DBWithThreadMode<T>
impl<T: ThreadMode> DBWithThreadMode<T>
Methods of DBWithThreadMode
.
sourcepub fn open_default<P: AsRef<Path>>(path: P) -> Result<Self, Error>
pub fn open_default<P: AsRef<Path>>(path: P) -> Result<Self, Error>
Opens a database with default options.
sourcepub fn open<P: AsRef<Path>>(opts: &Options, path: P) -> Result<Self, Error>
pub fn open<P: AsRef<Path>>(opts: &Options, path: P) -> Result<Self, Error>
Opens the database with the specified options.
sourcepub fn open_for_read_only<P: AsRef<Path>>(
opts: &Options,
path: P,
error_if_log_file_exist: bool,
) -> Result<Self, Error>
pub fn open_for_read_only<P: AsRef<Path>>( opts: &Options, path: P, error_if_log_file_exist: bool, ) -> Result<Self, Error>
Opens the database for read only with the specified options.
sourcepub fn open_as_secondary<P: AsRef<Path>>(
opts: &Options,
primary_path: P,
secondary_path: P,
) -> Result<Self, Error>
pub fn open_as_secondary<P: AsRef<Path>>( opts: &Options, primary_path: P, secondary_path: P, ) -> Result<Self, Error>
Opens the database as a secondary.
sourcepub fn open_with_ttl<P: AsRef<Path>>(
opts: &Options,
path: P,
ttl: Duration,
) -> Result<Self, Error>
pub fn open_with_ttl<P: AsRef<Path>>( opts: &Options, path: P, ttl: Duration, ) -> Result<Self, Error>
Opens the database with a Time to Live compaction filter.
sourcepub fn open_cf_with_ttl<P, I, N>(
opts: &Options,
path: P,
cfs: I,
ttl: Duration,
) -> Result<Self, Error>
pub fn open_cf_with_ttl<P, I, N>( opts: &Options, path: P, cfs: I, ttl: Duration, ) -> Result<Self, Error>
Opens the database with a Time to Live compaction filter and column family names.
Column families opened using this function will be created with default Options
.
sourcepub fn open_cf_descriptors_with_ttl<P, I>(
opts: &Options,
path: P,
cfs: I,
ttl: Duration,
) -> Result<Self, Error>
pub fn open_cf_descriptors_with_ttl<P, I>( opts: &Options, path: P, cfs: I, ttl: Duration, ) -> Result<Self, Error>
Opens a database with the given database with a Time to Live compaction filter and column family descriptors.
sourcepub fn open_cf<P, I, N>(opts: &Options, path: P, cfs: I) -> Result<Self, Error>
pub fn open_cf<P, I, N>(opts: &Options, path: P, cfs: I) -> Result<Self, Error>
Opens a database with the given database options and column family names.
Column families opened using this function will be created with default Options
.
sourcepub fn open_cf_with_opts<P, I, N>(
opts: &Options,
path: P,
cfs: I,
) -> Result<Self, Error>
pub fn open_cf_with_opts<P, I, N>( opts: &Options, path: P, cfs: I, ) -> Result<Self, Error>
Opens a database with the given database options and column family names.
Column families opened using given Options
.
sourcepub fn open_cf_for_read_only<P, I, N>(
opts: &Options,
path: P,
cfs: I,
error_if_log_file_exist: bool,
) -> Result<Self, Error>
pub fn open_cf_for_read_only<P, I, N>( opts: &Options, path: P, cfs: I, error_if_log_file_exist: bool, ) -> Result<Self, Error>
Opens a database for read only with the given database options and column family names.
sourcepub fn open_cf_with_opts_for_read_only<P, I, N>(
db_opts: &Options,
path: P,
cfs: I,
error_if_log_file_exist: bool,
) -> Result<Self, Error>
pub fn open_cf_with_opts_for_read_only<P, I, N>( db_opts: &Options, path: P, cfs: I, error_if_log_file_exist: bool, ) -> Result<Self, Error>
Opens a database for read only with the given database options and column family names.
sourcepub fn open_cf_descriptors_read_only<P, I>(
opts: &Options,
path: P,
cfs: I,
error_if_log_file_exist: bool,
) -> Result<Self, Error>
pub fn open_cf_descriptors_read_only<P, I>( opts: &Options, path: P, cfs: I, error_if_log_file_exist: bool, ) -> Result<Self, Error>
Opens a database for ready only with the given database options and column family descriptors.
sourcepub fn open_cf_as_secondary<P, I, N>(
opts: &Options,
primary_path: P,
secondary_path: P,
cfs: I,
) -> Result<Self, Error>
pub fn open_cf_as_secondary<P, I, N>( opts: &Options, primary_path: P, secondary_path: P, cfs: I, ) -> Result<Self, Error>
Opens the database as a secondary with the given database options and column family names.
sourcepub fn open_cf_descriptors_as_secondary<P, I>(
opts: &Options,
path: P,
secondary_path: P,
cfs: I,
) -> Result<Self, Error>
pub fn open_cf_descriptors_as_secondary<P, I>( opts: &Options, path: P, secondary_path: P, cfs: I, ) -> Result<Self, Error>
Opens the database as a secondary with the given database options and column family descriptors.
sourcepub fn open_cf_descriptors<P, I>(
opts: &Options,
path: P,
cfs: I,
) -> Result<Self, Error>
pub fn open_cf_descriptors<P, I>( opts: &Options, path: P, cfs: I, ) -> Result<Self, Error>
Opens a database with the given database options and column family descriptors.
sourcepub fn delete_range_cf_opt<K: AsRef<[u8]>>(
&self,
cf: &impl AsColumnFamilyRef,
from: K,
to: K,
writeopts: &WriteOptions,
) -> Result<(), Error>
pub fn delete_range_cf_opt<K: AsRef<[u8]>>( &self, cf: &impl AsColumnFamilyRef, from: K, to: K, writeopts: &WriteOptions, ) -> Result<(), Error>
Removes the database entries in the range ["from", "to")
using given write options.
sourcepub fn delete_range_cf<K: AsRef<[u8]>>(
&self,
cf: &impl AsColumnFamilyRef,
from: K,
to: K,
) -> Result<(), Error>
pub fn delete_range_cf<K: AsRef<[u8]>>( &self, cf: &impl AsColumnFamilyRef, from: K, to: K, ) -> Result<(), Error>
Removes the database entries in the range ["from", "to")
using default write options.