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>

Methods of DBWithThreadMode.

source

pub fn open_default<P: AsRef<Path>>(path: P) -> Result<Self, Error>

Opens a database with default options.

source

pub fn open<P: AsRef<Path>>(opts: &Options, path: P) -> Result<Self, Error>

Opens the database with the specified options.

source

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.

source

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.

source

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.

source

pub fn open_cf_with_ttl<P, I, N>( opts: &Options, path: P, cfs: I, ttl: Duration, ) -> Result<Self, Error>
where P: AsRef<Path>, I: IntoIterator<Item = N>, N: AsRef<str>,

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.

source

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.

source

pub fn open_cf<P, I, N>(opts: &Options, path: P, cfs: I) -> Result<Self, Error>
where P: AsRef<Path>, I: IntoIterator<Item = N>, N: AsRef<str>,

Opens a database with the given database options and column family names.

Column families opened using this function will be created with default Options.

source

pub fn open_cf_with_opts<P, I, N>( opts: &Options, path: P, cfs: I, ) -> Result<Self, Error>
where P: AsRef<Path>, I: IntoIterator<Item = (N, Options)>, N: AsRef<str>,

Opens a database with the given database options and column family names.

Column families opened using given Options.

source

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>
where P: AsRef<Path>, I: IntoIterator<Item = N>, N: AsRef<str>,

Opens a database for read only with the given database options and column family names.

source

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>
where P: AsRef<Path>, I: IntoIterator<Item = (N, Options)>, N: AsRef<str>,

Opens a database for read only with the given database options and column family names.

source

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.

source

pub fn open_cf_as_secondary<P, I, N>( opts: &Options, primary_path: P, secondary_path: P, cfs: I, ) -> Result<Self, Error>
where P: AsRef<Path>, I: IntoIterator<Item = N>, N: AsRef<str>,

Opens the database as a secondary with the given database options and column family names.

source

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.

source

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.

source

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.

source

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.

source

pub fn write_opt( &self, batch: WriteBatch, writeopts: &WriteOptions, ) -> Result<(), Error>

source

pub fn write(&self, batch: WriteBatch) -> Result<(), Error>

source

pub fn write_without_wal(&self, batch: WriteBatch) -> Result<(), Error>