ckb_rocksdb

Struct OptimisticTransactionSnapshot

Source
pub struct OptimisticTransactionSnapshot<'a> { /* private fields */ }

Trait Implementations§

Source§

impl<'a> ConstHandle<rocksdb_snapshot_t> for OptimisticTransactionSnapshot<'a>

Source§

impl<'a> Drop for OptimisticTransactionSnapshot<'a>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl<'a> GetCF<ReadOptions> for OptimisticTransactionSnapshot<'a>

Source§

fn get_cf_full<K: AsRef<[u8]>>( &self, cf: Option<&ColumnFamily>, key: K, readopts: Option<&ReadOptions>, ) -> Result<Option<DBVector>, Error>

Source§

fn get_cf<K: AsRef<[u8]>>( &self, cf: &ColumnFamily, key: K, ) -> Result<Option<DBVector>, Error>

Source§

fn get_cf_opt<K: AsRef<[u8]>>( &self, cf: &ColumnFamily, key: K, readopts: &R, ) -> Result<Option<DBVector>, Error>

Source§

impl<'a> GetPinnedCF<'a> for OptimisticTransactionSnapshot<'a>

Source§

type ColumnFamily = &'a ColumnFamily

Source§

type ReadOptions = &'a ReadOptions

Source§

fn get_pinned_cf_full<K: AsRef<[u8]>>( &'a self, cf: Option<Self::ColumnFamily>, key: K, readopts: Option<Self::ReadOptions>, ) -> Result<Option<DBPinnableSlice<'a>>, Error>

Return the value associated with a key using RocksDB’s PinnableSlice so as to avoid unnecessary memory copy.
Source§

fn get_pinned_cf<K: AsRef<[u8]>>( &'a self, cf: Self::ColumnFamily, key: K, ) -> Result<Option<DBPinnableSlice<'a>>, Error>

Return the value associated with a key using RocksDB’s PinnableSlice so as to avoid unnecessary memory copy.
Source§

fn get_pinned_cf_opt<K: AsRef<[u8]>>( &'a self, cf: Self::ColumnFamily, key: K, readopts: Self::ReadOptions, ) -> Result<Option<DBPinnableSlice<'a>>, Error>

Return the value associated with a key using RocksDB’s PinnableSlice so as to avoid unnecessary memory copy.
Source§

impl Iterate for OptimisticTransactionSnapshot<'_>

Source§

fn get_raw_iter<'a: 'b, 'b>( &'a self, readopts: &ReadOptions, ) -> DBRawIterator<'b>

Source§

fn get_iter<'a: 'b, 'b>( &'a self, readopts: &ReadOptions, mode: IteratorMode<'_>, ) -> DBIterator<'b>

Source§

fn iterator_opt<'a: 'b, 'b>( &'a self, mode: IteratorMode<'_>, readopts: &ReadOptions, ) -> DBIterator<'b>

Source§

fn iterator<'a: 'b, 'b>(&'a self, mode: IteratorMode<'_>) -> DBIterator<'b>

Source§

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.
Source§

fn prefix_iterator<'a: 'b, 'b>(&'a self, prefix: &[u8]) -> DBIterator<'b>

Source§

fn raw_iterator<'a: 'b, 'b>(&'a self) -> DBRawIterator<'b>

Source§

impl IterateCF for OptimisticTransactionSnapshot<'_>

Source§

fn get_raw_iter_cf<'a: 'b, 'b>( &'a self, cf_handle: &ColumnFamily, readopts: &ReadOptions, ) -> Result<DBRawIterator<'b>, Error>

Source§

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>

Opens an interator using the provided ReadOptions. This is used when you want to iterate over a specific ColumnFamily with a modified ReadOptions
Source§

fn iterator_cf<'a: 'b, 'b>( &'a self, cf_handle: &ColumnFamily, mode: IteratorMode<'_>, ) -> Result<DBIterator<'b>, Error>

Source§

fn full_iterator_cf<'a: 'b, 'b>( &'a self, cf_handle: &ColumnFamily, mode: IteratorMode<'_>, ) -> Result<DBIterator<'b>, Error>

Source§

fn prefix_iterator_cf<'a: 'b, 'b>( &'a self, cf_handle: &ColumnFamily, prefix: &[u8], ) -> Result<DBIterator<'b>, Error>

Source§

fn raw_iterator_cf<'a: 'b, 'b>( &'a self, cf_handle: &ColumnFamily, ) -> Result<DBRawIterator<'b>, Error>

Source§

impl<'a> MultiGet<ReadOptions> for OptimisticTransactionSnapshot<'a>

Source§

fn multi_get_full<K, I>( &self, keys: I, readopts: Option<&ReadOptions>, ) -> Vec<Result<Option<DBVector>, Error>>
where K: AsRef<[u8]>, I: IntoIterator<Item = K>,

Source§

fn multi_get<K, I>(&self, keys: I) -> Vec<Result<Option<DBVector>, Error>>
where K: AsRef<[u8]>, I: IntoIterator<Item = K>,

Source§

fn multi_get_opt<K, I>( &self, keys: I, readopts: &R, ) -> Vec<Result<Option<DBVector>, Error>>
where K: AsRef<[u8]>, I: IntoIterator<Item = K>,

Source§

impl<'a> MultiGetCF<ReadOptions> for OptimisticTransactionSnapshot<'a>

Source§

fn multi_get_cf_full<'m, K, I>( &self, keys: I, readopts: Option<&ReadOptions>, ) -> Vec<Result<Option<DBVector>, Error>>
where K: AsRef<[u8]>, I: IntoIterator<Item = (&'m ColumnFamily, K)>,

Source§

fn multi_get_cf<'a, K, I>( &self, keys_cf: I, ) -> Vec<Result<Option<DBVector>, Error>>
where K: AsRef<[u8]>, I: IntoIterator<Item = (&'a ColumnFamily, K)>,

Source§

fn multi_get_cf_opt<'a, K, I>( &self, keys_cf: I, readopts: &R, ) -> Vec<Result<Option<DBVector>, Error>>
where K: AsRef<[u8]>, I: IntoIterator<Item = (&'a ColumnFamily, K)>,

Source§

impl<'a> Read for OptimisticTransactionSnapshot<'a>

Source§

impl<'a> Send for OptimisticTransactionSnapshot<'a>

Source§

impl<'a> Sync for OptimisticTransactionSnapshot<'a>

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, R> Get<R> for T
where T: GetCF<R>,

Source§

fn get_full<K>( &self, key: K, readopts: Option<&R>, ) -> Result<Option<DBVector>, Error>
where K: AsRef<[u8]>,

Source§

fn get<K: AsRef<[u8]>>(&self, key: K) -> Result<Option<DBVector>, Error>

Return the bytes associated with a key value
Source§

fn get_opt<K: AsRef<[u8]>>( &self, key: K, readopts: &R, ) -> Result<Option<DBVector>, Error>

Source§

impl<'a, T, R> GetPinned<'a> for T
where T: GetPinnedCF<'a, ReadOptions = R>,

Source§

type ReadOptions = R

Source§

fn get_pinned_full<K>( &'a self, key: K, readopts: Option<<T as GetPinned<'a>>::ReadOptions>, ) -> Result<Option<DBPinnableSlice<'a>>, Error>
where K: AsRef<[u8]>,

Return the value associated with a key using RocksDB’s PinnableSlice so as to avoid unnecessary memory copy.
Source§

fn get_pinned<K: AsRef<[u8]>>( &'a self, key: K, ) -> Result<Option<DBPinnableSlice<'a>>, Error>

Return the value associated with a key using RocksDB’s PinnableSlice so as to avoid unnecessary memory copy. Similar to get_pinned_opt but leverages default options.
Source§

fn get_pinned_opt<K: AsRef<[u8]>>( &'a self, key: K, readopts: Self::ReadOptions, ) -> Result<Option<DBPinnableSlice<'a>>, Error>

Return the value associated with a key using RocksDB’s PinnableSlice so as to avoid unnecessary memory copy.
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.