Struct rocksdb::rocksdb::DB [−][src]
Implementations
impl DB
[src]
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_with_ttl(
opts: DBOptions,
path: &str,
ttls: &[i32]
) -> Result<DB, String>
[src]
opts: DBOptions,
path: &str,
ttls: &[i32]
) -> Result<DB, String>
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_cf_with_ttl<'a, T>(
opts: DBOptions,
path: &str,
cfds: Vec<T>,
ttls: &[i32]
) -> Result<DB, String> where
T: Into<ColumnFamilyDescriptor<'a>>,
[src]
opts: DBOptions,
path: &str,
cfds: Vec<T>,
ttls: &[i32]
) -> 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 env(&self) -> Option<Arc<Env>>
[src]
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 multi_batch_write(
&self,
batches: &[WriteBatch],
writeopts: &WriteOptions
) -> Result<(), String>
[src]
&self,
batches: &[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’.
pub fn cf_handle_by_id(&self, id: usize) -> Option<&CFHandle>
[src]
get all column family names, including ‘default’.
pub fn iter(&self) -> DBIterator<&DB>ⓘNotable traits for &'b mut DBIterator<D>
impl<'b, D> Iterator for &'b mut DBIterator<D> type Item = Kv;
[src]
Notable traits for &'b mut DBIterator<D>
impl<'b, D> Iterator for &'b mut DBIterator<D> type Item = Kv;
pub fn iter_opt(&self, opt: ReadOptions) -> DBIterator<&DB>ⓘNotable traits for &'b mut DBIterator<D>
impl<'b, D> Iterator for &'b mut DBIterator<D> type Item = Kv;
[src]
Notable traits for &'b mut DBIterator<D>
impl<'b, D> Iterator for &'b mut DBIterator<D> type Item = Kv;
pub fn iter_cf(&self, cf_handle: &CFHandle) -> DBIterator<&DB>ⓘNotable traits for &'b mut DBIterator<D>
impl<'b, D> Iterator for &'b mut DBIterator<D> type Item = Kv;
[src]
Notable traits for &'b mut DBIterator<D>
impl<'b, D> Iterator for &'b mut DBIterator<D> type Item = Kv;
pub fn iter_cf_opt(
&self,
cf_handle: &CFHandle,
opts: ReadOptions
) -> DBIterator<&DB>ⓘNotable traits for &'b mut DBIterator<D>
impl<'b, D> Iterator for &'b mut DBIterator<D> type Item = Kv;
[src]
&self,
cf_handle: &CFHandle,
opts: ReadOptions
) -> DBIterator<&DB>ⓘ
Notable traits for &'b mut DBIterator<D>
impl<'b, D> Iterator for &'b mut DBIterator<D> type Item = Kv;
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, wait: bool) -> Result<(), String>
[src]
Flush all memtable data. If wait, the flush will wait until the flush is done.
pub fn flush_cf(&self, cf: &CFHandle, wait: bool) -> Result<(), String>
[src]
Flush all memtable data for specified cf. If wait, the flush will wait until the flush is done.
pub fn flush_cfs(&self, cfs: &[&CFHandle], wait: bool) -> Result<(), String>
[src]
Flushes multiple column families.
If atomic flush is not enabled, flush_cfs is equivalent to
calling flush_cf multiple times.
If atomic flush is enabled, flush_cfs will flush all column families
specified in cfs
up to the latest sequence number at the time
when flush is requested.
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_latest_sequence_number(&self) -> u64
[src]
Get the sequence number of the most recent transaction.
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 delete_blob_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_blob_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_blob_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_db_options(&self) -> DBOptions
[src]
pub fn get_map_property_cf(
&self,
cf: &CFHandle,
name: &str
) -> Option<MapProperty>
[src]
&self,
cf: &CFHandle,
name: &str
) -> Option<MapProperty>
pub fn set_db_options(&self, options: &[(&str, &str)]) -> Result<(), String>
[src]
pub fn get_options(&self) -> ColumnFamilyOptions
[src]
pub fn get_options_cf(&self, cf: &CFHandle) -> ColumnFamilyOptions
[src]
pub fn set_options_cf(
&self,
cf: &CFHandle,
options: &[(&str, &str)]
) -> Result<(), String>
[src]
&self,
cf: &CFHandle,
options: &[(&str, &str)]
) -> Result<(), String>
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 ingest_external_file_optimized(
&self,
cf: &CFHandle,
opt: &IngestExternalFileOptions,
files: &[&str]
) -> Result<bool, String>
[src]
&self,
cf: &CFHandle,
opt: &IngestExternalFileOptions,
files: &[&str]
) -> Result<bool, String>
An optimized version of ingest_external_file_cf
. It will
first try to ingest files without blocking and fallback to a
blocking ingestion if the optimization fails.
Returns true if a memtable is flushed without blocking.
pub fn backup_at(&self, path: &str) -> Result<BackupEngine, String>
[src]
pub fn restore_from(
backup_engine: &BackupEngine,
restore_db_path: &str,
restore_wal_path: &str,
ropts: &RestoreOptions
) -> Result<DB, String>
[src]
backup_engine: &BackupEngine,
restore_db_path: &str,
restore_wal_path: &str,
ropts: &RestoreOptions
) -> Result<DB, String>
pub fn get_block_cache_usage(&self) -> u64
[src]
pub fn get_block_cache_usage_cf(&self, cf: &CFHandle) -> u64
[src]
pub fn get_blob_cache_usage(&self) -> u64
[src]
pub fn get_blob_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_rc(
&self
) -> Result<RcTablePropertiesCollection, String>
[src]
&self
) -> Result<RcTablePropertiesCollection, 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_properties_of_tables_in_range_rc(
&self,
cf: &CFHandle,
ranges: &[Range<'_>]
) -> Result<RcTablePropertiesCollection, String>
[src]
&self,
cf: &CFHandle,
ranges: &[Range<'_>]
) -> Result<RcTablePropertiesCollection, String>
Like get_properties_of_table_in_range
but the returned family
of types don’t contain any lifetimes. This is suitable for wrapping
in further abstractions without needing abstract associated lifetime
parameters. Used by tikv’s engine_rocks
.
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>
pub fn get_column_family_meta_data(&self, cf: &CFHandle) -> ColumnFamilyMetaData
[src]
pub fn compact_files_cf(
&self,
cf: &CFHandle,
opts: &CompactionOptions,
input_files: &[String],
output_level: i32
) -> Result<(), String>
[src]
&self,
cf: &CFHandle,
opts: &CompactionOptions,
input_files: &[String],
output_level: i32
) -> Result<(), String>
Trait Implementations
impl Debug for DB
[src]
impl Drop for DB
[src]
impl Send for DB
[src]
impl Sync for DB
[src]
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>
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,