Struct parity_rocksdb::rocksdb::DB
source · [−]pub struct DB { /* private fields */ }
Implementations
sourceimpl DB
impl DB
pub fn open_default(path: &str) -> Result<DB, String>
pub fn open(opts: &Options, path: &str) -> Result<DB, String>
pub fn open_cf(
opts: &Options,
path: &str,
cfs: &[&str],
cf_opts: &[Options]
) -> Result<DB, String>
pub fn destroy(opts: &Options, path: &str) -> Result<(), String>
pub fn repair(opts: &Options, path: &str) -> Result<(), String>
pub fn write_opt(
&self,
batch: WriteBatch,
writeopts: &WriteOptions
) -> Result<(), String>
pub fn write(&self, batch: WriteBatch) -> Result<(), String>
pub fn get_opt(
&self,
key: &[u8],
readopts: &ReadOptions
) -> Result<Option<DBVector>, String>
sourcepub fn get_int_property(&self, prop: &str) -> u64
pub fn get_int_property(&self, prop: &str) -> u64
Query a RocksDB instance for a “property” that returns a numeric value. The available properties are listed here but note that only properties returning a numeric value can be queried using this function.
sourcepub fn get_int_property_cf(&self, cf: Column, prop: &str) -> u64
pub fn get_int_property_cf(&self, cf: Column, prop: &str) -> u64
Query a RocksDB instance scoped to a column family for a “property” that returns a numeric value. The available properties are listed here but note that only properties returning a numeric value can be queried using this function.
sourcepub fn get_property_value(&self, prop: &str) -> String
pub fn get_property_value(&self, prop: &str) -> String
Query a RocksDB instance for a “property” value. The available properties are listed here
sourcepub fn get_property_value_cf(&self, cf: Column, prop: &str) -> String
pub fn get_property_value_cf(&self, cf: Column, prop: &str) -> String
Query a RocksDB instance scoped to a column family for a “property” value. The available properties are listed here
pub fn get(&self, key: &[u8]) -> Result<Option<DBVector>, String>
pub fn get_cf_opt(
&self,
cf: Column,
key: &[u8],
readopts: &ReadOptions
) -> Result<Option<DBVector>, String>
pub fn get_cf(&self, cf: Column, key: &[u8]) -> Result<Option<DBVector>, String>
pub fn create_cf(
&mut self,
name: &str,
opts: &Options
) -> Result<Column, String>
pub fn drop_cf(&mut self, name: &str) -> Result<(), String>
pub fn cf_handle(&self, name: &str) -> Option<Column>
pub fn iterator(&self, mode: IteratorMode<'_>) -> DBIteratorⓘNotable traits for DBIteratorimpl Iterator for DBIterator type Item = (Box<[u8]>, Box<[u8]>);
pub fn iterator_opt(
&self,
mode: IteratorMode<'_>,
opts: &ReadOptions
) -> DBIteratorⓘNotable traits for DBIteratorimpl Iterator for DBIterator type Item = (Box<[u8]>, Box<[u8]>);
pub fn iterator_cf(
&self,
cf_handle: Column,
mode: IteratorMode<'_>
) -> Result<DBIterator, String>
pub fn iterator_cf_opt(
&self,
cf_handle: Column,
mode: IteratorMode<'_>,
opts: &ReadOptions
) -> Result<DBIterator, String>
pub fn snapshot(&self) -> Snapshot<'_>
pub fn put_opt(
&self,
key: &[u8],
value: &[u8],
writeopts: &WriteOptions
) -> Result<(), String>
pub fn put_cf_opt(
&self,
cf: Column,
key: &[u8],
value: &[u8],
writeopts: &WriteOptions
) -> Result<(), String>
pub fn merge_opt(
&self,
key: &[u8],
value: &[u8],
writeopts: &WriteOptions
) -> Result<(), String>
pub fn merge_cf_opt(
&self,
cf: Column,
key: &[u8],
value: &[u8],
writeopts: &WriteOptions
) -> Result<(), String>
pub fn delete_opt(
&self,
key: &[u8],
writeopts: &WriteOptions
) -> Result<(), String>
pub fn delete_cf_opt(
&self,
cf: Column,
key: &[u8],
writeopts: &WriteOptions
) -> Result<(), String>
Trait Implementations
sourceimpl Writable for DB
impl Writable for DB
fn put(&self, key: &[u8], value: &[u8]) -> Result<(), String>
fn put_cf(&self, cf: Column, key: &[u8], value: &[u8]) -> Result<(), String>
fn merge(&self, key: &[u8], value: &[u8]) -> Result<(), String>
fn merge_cf(&self, cf: Column, key: &[u8], value: &[u8]) -> Result<(), String>
fn delete(&self, key: &[u8]) -> Result<(), String>
fn delete_cf(&self, cf: Column, key: &[u8]) -> Result<(), String>
impl Send for DB
impl Sync for DB
Auto Trait Implementations
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more