Struct emerald_rocksdb::DB
[−]
[src]
pub struct DB { /* fields omitted */ }
A RocksDB database.
See crate level documentation for a simple usage example.
Methods
impl DB
[src]
fn open_cf<P: AsRef<Path>>(
opts: &Options,
path: P,
cfs: &[&str]
) -> Result<DB, Error>
[src]
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 open_default<P: AsRef<Path>>(path: P) -> Result<DB, Error>
[src]
Open a database with default options.
fn open<P: AsRef<Path>>(opts: &Options, path: P) -> Result<DB, Error>
[src]
Open the database with the specified options.
fn list_cf<P: AsRef<Path>>(
opts: &Options,
path: P
) -> Result<Vec<String>, Error>
[src]
opts: &Options,
path: P
) -> Result<Vec<String>, Error>
fn destroy<P: AsRef<Path>>(opts: &Options, path: P) -> Result<(), Error>
[src]
fn repair<P: AsRef<Path>>(opts: Options, path: P) -> Result<(), Error>
[src]
fn path(&self) -> &Path
[src]
fn write_opt(
&self,
batch: WriteBatch,
writeopts: &WriteOptions
) -> Result<(), Error>
[src]
&self,
batch: WriteBatch,
writeopts: &WriteOptions
) -> Result<(), Error>
fn write(&self, batch: WriteBatch) -> Result<(), Error>
[src]
fn write_without_wal(&self, batch: WriteBatch) -> Result<(), Error>
[src]
fn get_opt(
&self,
key: &[u8],
readopts: &ReadOptions
) -> Result<Option<DBVector>, Error>
[src]
&self,
key: &[u8],
readopts: &ReadOptions
) -> Result<Option<DBVector>, Error>
fn get(&self, key: &[u8]) -> Result<Option<DBVector>, Error>
[src]
Return the bytes associated with a key value
fn get_cf_opt(
&self,
cf: ColumnFamily,
key: &[u8],
readopts: &ReadOptions
) -> Result<Option<DBVector>, Error>
[src]
&self,
cf: ColumnFamily,
key: &[u8],
readopts: &ReadOptions
) -> Result<Option<DBVector>, Error>
fn get_cf(
&self,
cf: ColumnFamily,
key: &[u8]
) -> Result<Option<DBVector>, Error>
[src]
&self,
cf: ColumnFamily,
key: &[u8]
) -> Result<Option<DBVector>, Error>
fn create_cf(
&mut self,
name: &str,
opts: &Options
) -> Result<ColumnFamily, Error>
[src]
&mut self,
name: &str,
opts: &Options
) -> Result<ColumnFamily, Error>
fn drop_cf(&mut self, name: &str) -> Result<(), Error>
[src]
fn cf_handle(&self, name: &str) -> Option<ColumnFamily>
[src]
Return the underlying column family handle.
fn iterator(&self, mode: IteratorMode) -> DBIterator
[src]
fn iterator_cf(
&self,
cf_handle: ColumnFamily,
mode: IteratorMode
) -> Result<DBIterator, Error>
[src]
&self,
cf_handle: ColumnFamily,
mode: IteratorMode
) -> Result<DBIterator, Error>
fn raw_iterator(&self) -> DBRawIterator
[src]
fn raw_iterator_cf(
&self,
cf_handle: ColumnFamily
) -> Result<DBRawIterator, Error>
[src]
&self,
cf_handle: ColumnFamily
) -> Result<DBRawIterator, Error>
fn snapshot(&self) -> Snapshot
[src]
fn put_opt(
&self,
key: &[u8],
value: &[u8],
writeopts: &WriteOptions
) -> Result<(), Error>
[src]
&self,
key: &[u8],
value: &[u8],
writeopts: &WriteOptions
) -> Result<(), Error>
fn put_cf_opt(
&self,
cf: ColumnFamily,
key: &[u8],
value: &[u8],
writeopts: &WriteOptions
) -> Result<(), Error>
[src]
&self,
cf: ColumnFamily,
key: &[u8],
value: &[u8],
writeopts: &WriteOptions
) -> Result<(), Error>
fn merge_opt(
&self,
key: &[u8],
value: &[u8],
writeopts: &WriteOptions
) -> Result<(), Error>
[src]
&self,
key: &[u8],
value: &[u8],
writeopts: &WriteOptions
) -> Result<(), Error>
fn merge_cf_opt(
&self,
cf: ColumnFamily,
key: &[u8],
value: &[u8],
writeopts: &WriteOptions
) -> Result<(), Error>
[src]
&self,
cf: ColumnFamily,
key: &[u8],
value: &[u8],
writeopts: &WriteOptions
) -> Result<(), Error>
fn delete_opt(&self, key: &[u8], writeopts: &WriteOptions) -> Result<(), Error>
[src]
fn delete_cf_opt(
&self,
cf: ColumnFamily,
key: &[u8],
writeopts: &WriteOptions
) -> Result<(), Error>
[src]
&self,
cf: ColumnFamily,
key: &[u8],
writeopts: &WriteOptions
) -> Result<(), Error>
fn put(&self, key: &[u8], value: &[u8]) -> Result<(), Error>
[src]
fn put_cf(
&self,
cf: ColumnFamily,
key: &[u8],
value: &[u8]
) -> Result<(), Error>
[src]
&self,
cf: ColumnFamily,
key: &[u8],
value: &[u8]
) -> Result<(), Error>
fn merge(&self, key: &[u8], value: &[u8]) -> Result<(), Error>
[src]
fn merge_cf(
&self,
cf: ColumnFamily,
key: &[u8],
value: &[u8]
) -> Result<(), Error>
[src]
&self,
cf: ColumnFamily,
key: &[u8],
value: &[u8]
) -> Result<(), Error>
fn delete(&self, key: &[u8]) -> Result<(), Error>
[src]
fn delete_cf(&self, cf: ColumnFamily, key: &[u8]) -> Result<(), Error>
[src]
fn compact_range(&self, start: Option<&[u8]>, end: Option<&[u8]>)
[src]
fn compact_range_cf(
&self,
cf: ColumnFamily,
start: Option<&[u8]>,
end: Option<&[u8]>
)
[src]
&self,
cf: ColumnFamily,
start: Option<&[u8]>,
end: Option<&[u8]>
)