Struct engine_rocks::raw::DB[][src]

pub struct DB {
    inner: *mut DBInstance,
    cfs_by_name: BTreeMap<String, usize>,
    cfs: Vec<Option<(String, CFHandle)>, Global>,
    path: String,
    opts: DBOptions,
    _cf_opts: Vec<ColumnFamilyOptions, Global>,
    readonly: bool,
}

Fields

inner: *mut DBInstancecfs_by_name: BTreeMap<String, usize>cfs: Vec<Option<(String, CFHandle)>, Global>path: Stringopts: DBOptions_cf_opts: Vec<ColumnFamilyOptions, Global>readonly: bool

Implementations

impl DB[src]

pub fn is_titan(&self) -> bool[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]

pub fn open_cf<'a, T>(
    opts: DBOptions,
    path: &str,
    cfds: Vec<T, Global>
) -> Result<DB, String> where
    T: Into<ColumnFamilyDescriptor<'a>>, 
[src]

pub fn open_cf_with_ttl<'a, T>(
    opts: DBOptions,
    path: &str,
    cfds: Vec<T, Global>,
    ttls: &[i32]
) -> Result<DB, String> where
    T: Into<ColumnFamilyDescriptor<'a>>, 
[src]

pub fn open_for_read_only(
    opts: DBOptions,
    path: &str,
    error_if_log_file_exist: bool
) -> Result<DB, String>
[src]

pub fn open_cf_for_read_only<'a, T>(
    opts: DBOptions,
    path: &str,
    cfds: Vec<T, Global>,
    error_if_log_file_exist: bool
) -> Result<DB, String> where
    T: Into<ColumnFamilyDescriptor<'a>>, 
[src]

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, Global>, String>
[src]

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]

pub fn multi_batch_write(
    &self,
    batches: &[WriteBatch],
    writeopts: &WriteOptions
) -> Result<(), String>
[src]

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]

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]

pub fn get_cf(
    &self,
    cf: &CFHandle,
    key: &[u8]
) -> Result<Option<DBVector>, String>
[src]

pub fn create_cf<'a, T>(&mut self, cfd: T) -> Result<&CFHandle, String> where
    T: Into<ColumnFamilyDescriptor<'a>>, 
[src]

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, Global>[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 = (Vec<u8, Global>, Vec<u8, Global>);
[src]

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 = (Vec<u8, Global>, Vec<u8, Global>);
[src]

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 = (Vec<u8, Global>, Vec<u8, Global>);
[src]

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 = (Vec<u8, Global>, Vec<u8, Global>);
[src]

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]

pub fn put_cf_opt(
    &self,
    cf: &CFHandle,
    key: &[u8],
    value: &[u8],
    writeopts: &WriteOptions
) -> Result<(), String>
[src]

pub fn merge_opt(
    &self,
    key: &[u8],
    value: &[u8],
    writeopts: &WriteOptions
) -> Result<(), String>
[src]

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, Global>[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, Global>
[src]

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]

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]

pub fn compact_range_cf_opt(
    &self,
    cf: &CFHandle,
    compact_options: &CompactOptions,
    start_key: Option<&[u8]>,
    end_key: Option<&[u8]>
)
[src]

pub fn delete_files_in_range(
    &self,
    start_key: &[u8],
    end_key: &[u8],
    include_end: bool
) -> Result<(), String>
[src]

pub fn delete_files_in_range_cf(
    &self,
    cf: &CFHandle,
    start_key: &[u8],
    end_key: &[u8],
    include_end: bool
) -> Result<(), String>
[src]

pub fn delete_files_in_ranges_cf(
    &self,
    cf: &CFHandle,
    ranges: &[Range<'_>],
    include_end: bool
) -> Result<(), String>
[src]

pub fn delete_blob_files_in_range(
    &self,
    start_key: &[u8],
    end_key: &[u8],
    include_end: bool
) -> Result<(), String>
[src]

pub fn delete_blob_files_in_range_cf(
    &self,
    cf: &CFHandle,
    start_key: &[u8],
    end_key: &[u8],
    include_end: bool
) -> Result<(), String>
[src]

pub fn delete_blob_files_in_ranges_cf(
    &self,
    cf: &CFHandle,
    ranges: &[Range<'_>],
    include_end: bool
) -> Result<(), String>
[src]

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]

pub fn get_and_reset_statistics_ticker_count(
    &self,
    ticker_type: DBStatisticsTickerType
) -> u64
[src]

pub fn get_statistics_histogram_string(
    &self,
    hist_type: DBStatisticsHistogramType
) -> Option<String>
[src]

pub fn get_statistics_histogram(
    &self,
    hist_type: DBStatisticsHistogramType
) -> Option<HistogramData>
[src]

pub fn get_db_options(&self) -> DBOptions[src]

pub fn get_map_property_cf(
    &self,
    cf: &CFHandle,
    name: &str
) -> Option<MapProperty>
[src]

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]

pub fn ingest_external_file(
    &self,
    opt: &IngestExternalFileOptions,
    files: &[&str]
) -> Result<(), String>
[src]

pub fn ingest_external_file_cf(
    &self,
    cf: &CFHandle,
    opt: &IngestExternalFileOptions,
    files: &[&str]
) -> Result<(), String>
[src]

pub fn ingest_external_file_optimized(
    &self,
    cf: &CFHandle,
    opt: &IngestExternalFileOptions,
    files: &[&str]
) -> Result<bool, String>
[src]

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]

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]

pub fn get_properties_of_all_tables_rc(
    &self
) -> Result<TablePropertiesCollection, String>
[src]

pub fn get_properties_of_all_tables_cf(
    &self,
    cf: &CFHandle
) -> Result<TablePropertiesCollection, String>
[src]

pub fn get_properties_of_tables_in_range(
    &self,
    cf: &CFHandle,
    ranges: &[Range<'_>]
) -> Result<TablePropertiesCollection, String>
[src]

pub fn get_properties_of_tables_in_range_rc(
    &self,
    cf: &CFHandle,
    ranges: &[Range<'_>]
) -> Result<TablePropertiesCollection, String>
[src]

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, Global>, String>
[src]

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]

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]

Auto Trait Implementations

impl RefUnwindSafe for DB

impl Unpin for DB

impl UnwindSafe for DB

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T[src]

type Init = T

The type for initializers.

impl<T> Same<T> for T[src]

type Output = T

Should always be Self

impl<T> Sealed<T> for T where
    T: ?Sized
[src]

impl<T> SendSyncUnwindSafe for T where
    T: Send + Sync + UnwindSafe + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]