Struct rocksdb::DB
[−]
[src]
pub struct DB { /* fields omitted */ }
A RocksDB database.
Methods
impl DB
[src]
fn open_default<P: AsRef<Path>>(path: P) -> Result<DB, Error>
Open a database with default options.
fn open<P: AsRef<Path>>(opts: &Options, path: P) -> Result<DB, Error>
Open the database with the specified options.
fn open_cf<P: AsRef<Path>>(opts: &Options, path: P, cfs: &[&str]) -> Result<DB, Error>
Open a database with specified options and column family.
A column family must be created first by calling DB::create_cf
.
Panics
- Panics if the column family doesn't exist.
fn destroy<P: AsRef<Path>>(opts: &Options, path: P) -> Result<(), Error>
fn repair<P: AsRef<Path>>(opts: Options, path: P) -> Result<(), Error>
fn path(&self) -> &Path
fn write_opt(&self, batch: WriteBatch, writeopts: &WriteOptions) -> Result<(), Error>
fn write(&self, batch: WriteBatch) -> Result<(), Error>
fn write_without_wal(&self, batch: WriteBatch) -> Result<(), Error>
fn get_opt(&self, key: &[u8], readopts: &ReadOptions) -> Result<Option<DBVector>, Error>
fn get(&self, key: &[u8]) -> Result<Option<DBVector>, Error>
Return the bytes associated with a key value
fn get_cf_opt(&self, cf: *mut rocksdb_column_family_handle_t, key: &[u8], readopts: &ReadOptions) -> Result<Option<DBVector>, Error>
fn get_cf(&self, cf: *mut rocksdb_column_family_handle_t, key: &[u8]) -> Result<Option<DBVector>, Error>
fn create_cf(&mut self, name: &str, opts: &Options) -> Result<*mut rocksdb_column_family_handle_t, Error>
fn drop_cf(&mut self, name: &str) -> Result<(), Error>
fn cf_handle(&self, name: &str) -> Option<&*mut rocksdb_column_family_handle_t>
Return the underlying column family handle.