pub struct TransactionDB { /* private fields */ }Expand description
A transaction database.
Implementations§
Source§impl TransactionDB
impl TransactionDB
Trait Implementations§
Source§impl CreateCF for TransactionDB
impl CreateCF for TransactionDB
Source§impl CreateCheckpointObject for TransactionDB
impl CreateCheckpointObject for TransactionDB
unsafe fn create_checkpoint_object_raw( &self, ) -> Result<*mut rocksdb_checkpoint_t, Error>
fn create_checkpoint_object(&self) -> Result<Checkpoint<'_>, Error>
Source§impl DeleteCF<WriteOptions> for TransactionDB
impl DeleteCF<WriteOptions> for TransactionDB
fn delete_cf_full<K>( &self, cf: Option<&ColumnFamily>, key: K, writeopts: Option<&WriteOptions>, ) -> Result<(), Error>
fn delete_cf<K>(&self, cf: &ColumnFamily, key: K) -> Result<(), Error>
fn put_cf_opt<K>( &self, cf: &ColumnFamily, key: K, writeopts: &W, ) -> Result<(), Error>
Source§impl Drop for TransactionDB
impl Drop for TransactionDB
Source§impl GetCF<ReadOptions> for TransactionDB
impl GetCF<ReadOptions> for TransactionDB
fn get_cf_full<K: AsRef<[u8]>>( &self, cf: Option<&ColumnFamily>, key: K, readopts: Option<&ReadOptions>, ) -> Result<Option<DBVector>, Error>
fn get_cf<K: AsRef<[u8]>>( &self, cf: &ColumnFamily, key: K, ) -> Result<Option<DBVector>, Error>
fn get_cf_opt<K: AsRef<[u8]>>( &self, cf: &ColumnFamily, key: K, readopts: &R, ) -> Result<Option<DBVector>, Error>
Source§impl GetColumnFamilys for TransactionDB
impl GetColumnFamilys for TransactionDB
fn get_cfs(&self) -> &BTreeMap<String, ColumnFamily>
fn get_mut_cfs(&mut self) -> &mut BTreeMap<String, ColumnFamily>
Source§impl Handle<rocksdb_transactiondb_t> for TransactionDB
impl Handle<rocksdb_transactiondb_t> for TransactionDB
fn handle(&self) -> *mut rocksdb_transactiondb_t
Source§impl Iterate for TransactionDB
impl Iterate for TransactionDB
fn get_raw_iter<'a: 'b, 'b>( &'a self, readopts: &ReadOptions, ) -> DBRawIterator<'b>
fn get_iter<'a: 'b, 'b>( &'a self, readopts: &ReadOptions, mode: IteratorMode<'_>, ) -> DBIterator<'b> ⓘ
fn iterator_opt<'a: 'b, 'b>( &'a self, mode: IteratorMode<'_>, readopts: &ReadOptions, ) -> DBIterator<'b> ⓘ
fn iterator<'a: 'b, 'b>(&'a self, mode: IteratorMode<'_>) -> DBIterator<'b> ⓘ
Source§fn full_iterator<'a: 'b, 'b>(&'a self, mode: IteratorMode<'_>) -> DBIterator<'b> ⓘ
fn full_iterator<'a: 'b, 'b>(&'a self, mode: IteratorMode<'_>) -> DBIterator<'b> ⓘ
Opens an interator with
set_total_order_seek enabled.
This must be used to iterate across prefixes when set_memtable_factory has been called
with a Hash-based implementation.fn prefix_iterator<'a: 'b, 'b>(&'a self, prefix: &[u8]) -> DBIterator<'b> ⓘ
fn raw_iterator<'a: 'b, 'b>(&'a self) -> DBRawIterator<'b>
Source§impl IterateCF for TransactionDB
impl IterateCF for TransactionDB
fn get_raw_iter_cf<'a: 'b, 'b>( &'a self, cf_handle: &ColumnFamily, readopts: &ReadOptions, ) -> Result<DBRawIterator<'b>, Error>
fn get_iter_cf<'a: 'b, 'b>( &'a self, cf_handle: &ColumnFamily, readopts: &ReadOptions, mode: IteratorMode<'_>, ) -> Result<DBIterator<'b>, Error>
Source§fn iterator_cf_opt<'a: 'b, 'b>(
&'a self,
cf_handle: &ColumnFamily,
mode: IteratorMode<'_>,
readopts: &ReadOptions,
) -> Result<DBIterator<'b>, Error>
fn iterator_cf_opt<'a: 'b, 'b>( &'a self, cf_handle: &ColumnFamily, mode: IteratorMode<'_>, readopts: &ReadOptions, ) -> Result<DBIterator<'b>, Error>
Opens an interator using the provided ReadOptions.
This is used when you want to iterate over a specific ColumnFamily with a modified ReadOptions
fn iterator_cf<'a: 'b, 'b>( &'a self, cf_handle: &ColumnFamily, mode: IteratorMode<'_>, ) -> Result<DBIterator<'b>, Error>
fn full_iterator_cf<'a: 'b, 'b>( &'a self, cf_handle: &ColumnFamily, mode: IteratorMode<'_>, ) -> Result<DBIterator<'b>, Error>
fn prefix_iterator_cf<'a: 'b, 'b>( &'a self, cf_handle: &ColumnFamily, prefix: &[u8], ) -> Result<DBIterator<'b>, Error>
fn raw_iterator_cf<'a: 'b, 'b>( &'a self, cf_handle: &ColumnFamily, ) -> Result<DBRawIterator<'b>, Error>
Source§impl MergeCF<WriteOptions> for TransactionDB
impl MergeCF<WriteOptions> for TransactionDB
fn merge_cf_full<K, V>( &self, cf: Option<&ColumnFamily>, key: K, value: V, writeopts: Option<&WriteOptions>, ) -> Result<(), Error>
fn merge_cf<K, V>( &self, cf: &ColumnFamily, key: K, value: V, ) -> Result<(), Error>
fn merge_cf_opt<K, V>( &self, cf: &ColumnFamily, key: K, value: V, writeopts: &W, ) -> Result<(), Error>
Source§impl MultiGet<ReadOptions> for TransactionDB
impl MultiGet<ReadOptions> for TransactionDB
fn multi_get_full<K, I>( &self, keys: I, readopts: Option<&ReadOptions>, ) -> Vec<Result<Option<DBVector>, Error>>
fn multi_get<K, I>(&self, keys: I) -> Vec<Result<Option<DBVector>, Error>>
fn multi_get_opt<K, I>( &self, keys: I, readopts: &R, ) -> Vec<Result<Option<DBVector>, Error>>
Source§impl MultiGetCF<ReadOptions> for TransactionDB
impl MultiGetCF<ReadOptions> for TransactionDB
fn multi_get_cf_full<'a, K, I>( &self, keys: I, readopts: Option<&ReadOptions>, ) -> Vec<Result<Option<DBVector>, Error>>
fn multi_get_cf<'a, K, I>( &self, keys_cf: I, ) -> Vec<Result<Option<DBVector>, Error>>
fn multi_get_cf_opt<'a, K, I>( &self, keys_cf: I, readopts: &R, ) -> Vec<Result<Option<DBVector>, Error>>
Source§impl Open for TransactionDB
impl Open for TransactionDB
Source§fn open_default<P: AsRef<Path>>(path: P) -> Result<Self, Error>
fn open_default<P: AsRef<Path>>(path: P) -> Result<Self, Error>
Open a database with default options.
Source§fn open<P: AsRef<Path>>(opts: &Options, path: P) -> Result<Self, Error>
fn open<P: AsRef<Path>>(opts: &Options, path: P) -> Result<Self, Error>
Open the database with the specified options.
fn open_with_descriptor<P: AsRef<Path>>( opts: &Options, path: P, descriptor: Self::Descriptor, ) -> Result<Self, Error>
Source§impl OpenCF for TransactionDB
impl OpenCF for TransactionDB
Source§fn open_cf<P, I, N>(opts: &Options, path: P, cfs: I) -> Result<Self, Error>
fn open_cf<P, I, N>(opts: &Options, path: P, cfs: I) -> Result<Self, Error>
Open a database with the given database options and column family names. Read more
Source§fn open_cf_descriptors<P, I>(
opts: &Options,
path: P,
cfs: I,
) -> Result<Self, Error>
fn open_cf_descriptors<P, I>( opts: &Options, path: P, cfs: I, ) -> Result<Self, Error>
Open a database with the given database options and column family descriptors.
fn open_cf_descriptors_with_descriptor<P, I>( opts: &Options, path: P, cfs: I, descriptor: Self::Descriptor, ) -> Result<Self, Error>
Source§impl PutCF<WriteOptions> for TransactionDB
impl PutCF<WriteOptions> for TransactionDB
fn put_cf_full<K, V>( &self, cf: Option<&ColumnFamily>, key: K, value: V, writeopts: Option<&WriteOptions>, ) -> Result<(), Error>
fn put_cf<K, V>(&self, cf: &ColumnFamily, key: K, value: V) -> Result<(), Error>
fn put_cf_opt<K, V>( &self, cf: &ColumnFamily, key: K, value: V, writeopts: &W, ) -> Result<(), Error>
impl Read for TransactionDB
impl Send for TransactionDB
impl Sync for TransactionDB
Source§impl TransactionBegin for TransactionDB
impl TransactionBegin for TransactionDB
type WriteOptions = WriteOptions
type TransactionOptions = TransactionOptions
fn transaction( &self, write_options: &WriteOptions, tx_options: &TransactionOptions, ) -> Transaction<'_, TransactionDB>
Source§fn transaction_default(&self) -> Transaction<'_, Self>
fn transaction_default(&self) -> Transaction<'_, Self>
Begins a new optimistic transaction with default options.
impl Write for TransactionDB
Source§impl WriteOps for TransactionDB
impl WriteOps for TransactionDB
fn write_full( &self, batch: &WriteBatch, writeopts: Option<&WriteOptions>, ) -> Result<(), Error>
fn write(&self, batch: &WriteBatch) -> Result<(), Error>
fn write_opt( &self, batch: &WriteBatch, writeopts: &WriteOptions, ) -> Result<(), Error>
fn write_without_wal(&self, batch: &WriteBatch) -> Result<(), Error>
Auto Trait Implementations§
impl Freeze for TransactionDB
impl RefUnwindSafe for TransactionDB
impl Unpin for TransactionDB
impl UnsafeUnpin for TransactionDB
impl UnwindSafe for TransactionDB
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T, W> Delete<W> for Twhere
T: DeleteCF<W>,
impl<T, W> Delete<W> for Twhere
T: DeleteCF<W>,
Source§impl<T, R> Get<R> for Twhere
T: GetCF<R>,
impl<T, R> Get<R> for Twhere
T: GetCF<R>,
fn get_full<K>( &self, key: K, readopts: Option<&R>, ) -> Result<Option<DBVector>, Error>
Source§fn get<K: AsRef<[u8]>>(&self, key: K) -> Result<Option<DBVector>, Error>
fn get<K: AsRef<[u8]>>(&self, key: K) -> Result<Option<DBVector>, Error>
Return the bytes associated with a key value