[−][src]Struct rexrocksdb::rocksdb::DB
Methods
impl DB
[src]
pub fn open_default(path: &str) -> Result<DB, String>
[src]
pub fn open(opts: DBOptions, path: &str) -> Result<DB, String>
[src]
pub fn open_cf<'a, T>(
opts: DBOptions,
path: &str,
cfds: Vec<T>
) -> Result<DB, String> where
T: Into<ColumnFamilyDescriptor<'a>>,
[src]
opts: DBOptions,
path: &str,
cfds: Vec<T>
) -> Result<DB, String> where
T: Into<ColumnFamilyDescriptor<'a>>,
pub fn open_for_read_only(
opts: DBOptions,
path: &str,
error_if_log_file_exist: bool
) -> Result<DB, String>
[src]
opts: DBOptions,
path: &str,
error_if_log_file_exist: bool
) -> Result<DB, String>
pub fn open_cf_for_read_only<'a, T>(
opts: DBOptions,
path: &str,
cfds: Vec<T>,
error_if_log_file_exist: bool
) -> Result<DB, String> where
T: Into<ColumnFamilyDescriptor<'a>>,
[src]
opts: DBOptions,
path: &str,
cfds: Vec<T>,
error_if_log_file_exist: bool
) -> Result<DB, String> where
T: Into<ColumnFamilyDescriptor<'a>>,
pub fn destroy(opts: &DBOptions, path: &str) -> Result<(), String>
[src]
pub fn repair(opts: DBOptions, path: &str) -> Result<(), String>
[src]
pub fn list_column_families(
opts: &DBOptions,
path: &str
) -> Result<Vec<String>, String>
[src]
opts: &DBOptions,
path: &str
) -> Result<Vec<String>, String>
pub fn pause_bg_work(&self)
[src]
pub fn continue_bg_work(&self)
[src]
pub fn path(&self) -> &str
[src]
pub fn write_opt(
&self,
batch: WriteBatch,
writeopts: &WriteOptions
) -> Result<(), String>
[src]
&self,
batch: WriteBatch,
writeopts: &WriteOptions
) -> Result<(), String>
pub fn write(&self, batch: WriteBatch) -> Result<(), String>
[src]
pub fn write_without_wal(&self, batch: WriteBatch) -> Result<(), String>
[src]
pub fn get_opt(
&self,
key: &[u8],
readopts: &ReadOptions
) -> Result<Option<DBVector>, String>
[src]
&self,
key: &[u8],
readopts: &ReadOptions
) -> Result<Option<DBVector>, String>
pub fn get(&self, key: &[u8]) -> Result<Option<DBVector>, String>
[src]
pub fn get_cf_opt(
&self,
cf: &CFHandle,
key: &[u8],
readopts: &ReadOptions
) -> Result<Option<DBVector>, String>
[src]
&self,
cf: &CFHandle,
key: &[u8],
readopts: &ReadOptions
) -> Result<Option<DBVector>, String>
pub fn get_cf(
&self,
cf: &CFHandle,
key: &[u8]
) -> Result<Option<DBVector>, String>
[src]
&self,
cf: &CFHandle,
key: &[u8]
) -> Result<Option<DBVector>, String>
pub fn create_cf<'a, T>(&mut self, cfd: T) -> Result<&CFHandle, String> where
T: Into<ColumnFamilyDescriptor<'a>>,
[src]
T: Into<ColumnFamilyDescriptor<'a>>,
pub fn drop_cf(&mut self, name: &str) -> Result<(), String>
[src]
pub fn cf_handle(&self, name: &str) -> Option<&CFHandle>
[src]
pub fn cf_names(&self) -> Vec<&str>
[src]
get all column family names, including 'default'.
ⓘImportant traits for &'b mut DBIterator<D>pub fn iter(&self) -> DBIterator<&DB>
[src]
ⓘImportant traits for &'b mut DBIterator<D>pub fn iter_opt(&self, opt: ReadOptions) -> DBIterator<&DB>
[src]
ⓘImportant traits for &'b mut DBIterator<D>pub fn iter_cf(&self, cf_handle: &CFHandle) -> DBIterator<&DB>
[src]
ⓘImportant traits for &'b mut DBIterator<D>pub fn iter_cf_opt(
&self,
cf_handle: &CFHandle,
opts: ReadOptions
) -> DBIterator<&DB>
[src]
&self,
cf_handle: &CFHandle,
opts: ReadOptions
) -> DBIterator<&DB>
pub fn snapshot(&self) -> Snapshot<&DB>
[src]
pub unsafe fn unsafe_snap(&self) -> UnsafeSnap
[src]
pub unsafe fn release_snap(&self, snap: &UnsafeSnap)
[src]
pub fn put_opt(
&self,
key: &[u8],
value: &[u8],
writeopts: &WriteOptions
) -> Result<(), String>
[src]
&self,
key: &[u8],
value: &[u8],
writeopts: &WriteOptions
) -> Result<(), String>
pub fn put_cf_opt(
&self,
cf: &CFHandle,
key: &[u8],
value: &[u8],
writeopts: &WriteOptions
) -> Result<(), String>
[src]
&self,
cf: &CFHandle,
key: &[u8],
value: &[u8],
writeopts: &WriteOptions
) -> Result<(), String>
pub fn merge_opt(
&self,
key: &[u8],
value: &[u8],
writeopts: &WriteOptions
) -> Result<(), String>
[src]
&self,
key: &[u8],
value: &[u8],
writeopts: &WriteOptions
) -> Result<(), String>
pub fn flush(&self, sync: bool) -> Result<(), String>
[src]
Flush all memtable data. If sync, the flush will wait until the flush is done.
pub fn flush_cf(&self, cf: &CFHandle, sync: bool) -> Result<(), String>
[src]
Flush all memtable data for specified cf. If sync, the flush will wait until the flush is done.
pub fn flush_wal(&self, sync: bool) -> Result<(), String>
[src]
Flush the WAL memory buffer to the file. If sync is true, it calls SyncWAL afterwards.
pub fn sync_wal(&self) -> Result<(), String>
[src]
Sync the wal. Note that Write() followed by SyncWAL() is not exactly the same as Write() with sync=true: in the latter case the changes won't be visible until the sync is done. Currently only works if allow_mmap_writes = false in Options.
pub fn get_approximate_sizes(&self, ranges: &[Range]) -> Vec<u64>
[src]
Return the approximate file system space used by keys in each ranges.
Note that the returned sizes measure file system space usage, so if the user data compresses by a factor of ten, the returned sizes will be one-tenth the size of the corresponding user data size.
Due to lack of abi, only data flushed to disk is taken into account.
pub fn get_approximate_sizes_cf(
&self,
cf: &CFHandle,
ranges: &[Range]
) -> Vec<u64>
[src]
&self,
cf: &CFHandle,
ranges: &[Range]
) -> Vec<u64>
pub fn get_approximate_memtable_stats(&self, range: &Range) -> (u64, u64)
[src]
pub fn get_approximate_memtable_stats_cf(
&self,
cf: &CFHandle,
range: &Range
) -> (u64, u64)
[src]
&self,
cf: &CFHandle,
range: &Range
) -> (u64, u64)
pub fn compact_range(&self, start_key: Option<&[u8]>, end_key: Option<&[u8]>)
[src]
pub fn compact_range_cf(
&self,
cf: &CFHandle,
start_key: Option<&[u8]>,
end_key: Option<&[u8]>
)
[src]
&self,
cf: &CFHandle,
start_key: Option<&[u8]>,
end_key: Option<&[u8]>
)
pub fn compact_range_cf_opt(
&self,
cf: &CFHandle,
compact_options: &CompactOptions,
start_key: Option<&[u8]>,
end_key: Option<&[u8]>
)
[src]
&self,
cf: &CFHandle,
compact_options: &CompactOptions,
start_key: Option<&[u8]>,
end_key: Option<&[u8]>
)
pub fn delete_files_in_range(
&self,
start_key: &[u8],
end_key: &[u8],
include_end: bool
) -> Result<(), String>
[src]
&self,
start_key: &[u8],
end_key: &[u8],
include_end: bool
) -> Result<(), String>
pub fn delete_files_in_range_cf(
&self,
cf: &CFHandle,
start_key: &[u8],
end_key: &[u8],
include_end: bool
) -> Result<(), String>
[src]
&self,
cf: &CFHandle,
start_key: &[u8],
end_key: &[u8],
include_end: bool
) -> Result<(), String>
pub fn delete_files_in_ranges_cf(
&self,
cf: &CFHandle,
ranges: &[Range],
include_end: bool
) -> Result<(), String>
[src]
&self,
cf: &CFHandle,
ranges: &[Range],
include_end: bool
) -> Result<(), String>
pub fn get_property_value(&self, name: &str) -> Option<String>
[src]
pub fn get_property_value_cf(&self, cf: &CFHandle, name: &str) -> Option<String>
[src]
pub fn get_property_int(&self, name: &str) -> Option<u64>
[src]
Return the int property in rocksdb. Return None if the property not exists or not int type.
pub fn get_property_int_cf(&self, cf: &CFHandle, name: &str) -> Option<u64>
[src]
pub fn get_statistics(&self) -> Option<String>
[src]
pub fn reset_statistics(&self)
[src]
pub fn get_statistics_ticker_count(
&self,
ticker_type: DBStatisticsTickerType
) -> u64
[src]
&self,
ticker_type: DBStatisticsTickerType
) -> u64
pub fn get_and_reset_statistics_ticker_count(
&self,
ticker_type: DBStatisticsTickerType
) -> u64
[src]
&self,
ticker_type: DBStatisticsTickerType
) -> u64
pub fn get_statistics_histogram_string(
&self,
hist_type: DBStatisticsHistogramType
) -> Option<String>
[src]
&self,
hist_type: DBStatisticsHistogramType
) -> Option<String>
pub fn get_statistics_histogram(
&self,
hist_type: DBStatisticsHistogramType
) -> Option<HistogramData>
[src]
&self,
hist_type: DBStatisticsHistogramType
) -> Option<HistogramData>
pub fn get_options(&self) -> ColumnFamilyOptions
[src]
pub fn get_options_cf(&self, cf: &CFHandle) -> ColumnFamilyOptions
[src]
pub fn ingest_external_file(
&self,
opt: &IngestExternalFileOptions,
files: &[&str]
) -> Result<(), String>
[src]
&self,
opt: &IngestExternalFileOptions,
files: &[&str]
) -> Result<(), String>
pub fn ingest_external_file_cf(
&self,
cf: &CFHandle,
opt: &IngestExternalFileOptions,
files: &[&str]
) -> Result<(), String>
[src]
&self,
cf: &CFHandle,
opt: &IngestExternalFileOptions,
files: &[&str]
) -> Result<(), String>
pub fn backup_at(&self, path: &str) -> Result<BackupEngine, String>
[src]
pub fn restore_from<'a, T>(
backup_engine: &BackupEngine,
restore_db_path: &str,
restore_wal_path: &str,
ropts: &RestoreOptions,
db_opts: DBOptions,
cfds: Vec<T>
) -> Result<DB, String> where
T: Into<ColumnFamilyDescriptor<'a>>,
[src]
backup_engine: &BackupEngine,
restore_db_path: &str,
restore_wal_path: &str,
ropts: &RestoreOptions,
db_opts: DBOptions,
cfds: Vec<T>
) -> Result<DB, String> where
T: Into<ColumnFamilyDescriptor<'a>>,
pub fn get_block_cache_usage(&self) -> u64
[src]
pub fn get_block_cache_usage_cf(&self, cf: &CFHandle) -> u64
[src]
pub fn get_properties_of_all_tables(
&self
) -> Result<TablePropertiesCollection, String>
[src]
&self
) -> Result<TablePropertiesCollection, String>
pub fn get_properties_of_all_tables_cf(
&self,
cf: &CFHandle
) -> Result<TablePropertiesCollection, String>
[src]
&self,
cf: &CFHandle
) -> Result<TablePropertiesCollection, String>
pub fn get_properties_of_tables_in_range(
&self,
cf: &CFHandle,
ranges: &[Range]
) -> Result<TablePropertiesCollection, String>
[src]
&self,
cf: &CFHandle,
ranges: &[Range]
) -> Result<TablePropertiesCollection, String>
pub fn get_all_key_versions(
&self,
start_key: &[u8],
end_key: &[u8]
) -> Result<Vec<KeyVersion>, String>
[src]
&self,
start_key: &[u8],
end_key: &[u8]
) -> Result<Vec<KeyVersion>, String>
Trait Implementations
impl Writable for DB
[src]
fn put(&self, key: &[u8], value: &[u8]) -> Result<(), String>
[src]
fn put_cf(&self, cf: &CFHandle, key: &[u8], value: &[u8]) -> Result<(), String>
[src]
fn merge(&self, key: &[u8], value: &[u8]) -> Result<(), String>
[src]
fn merge_cf(
&self,
cf: &CFHandle,
key: &[u8],
value: &[u8]
) -> Result<(), String>
[src]
&self,
cf: &CFHandle,
key: &[u8],
value: &[u8]
) -> Result<(), String>
fn delete(&self, key: &[u8]) -> Result<(), String>
[src]
fn delete_cf(&self, cf: &CFHandle, key: &[u8]) -> Result<(), String>
[src]
fn single_delete(&self, key: &[u8]) -> Result<(), String>
[src]
fn single_delete_cf(&self, cf: &CFHandle, key: &[u8]) -> Result<(), String>
[src]
fn delete_range(&self, begin_key: &[u8], end_key: &[u8]) -> Result<(), String>
[src]
fn delete_range_cf(
&self,
cf: &CFHandle,
begin_key: &[u8],
end_key: &[u8]
) -> Result<(), String>
[src]
&self,
cf: &CFHandle,
begin_key: &[u8],
end_key: &[u8]
) -> Result<(), String>
impl Drop for DB
[src]
impl Sync for DB
[src]
impl Send for DB
[src]
impl Debug for DB
[src]
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,