pub type SaplingTxIdsCf<'cf> = TypedColumnFamily<'cf, SaplingScannedDatabaseIndex, Option<SaplingScannedResult>>;
Expand description
The type for reading sapling transaction IDs results from the database.
This constant should be used so the compiler can detect incorrectly typed accesses to the column family.
Aliased Type§
struct SaplingTxIdsCf<'cf> { /* private fields */ }
Implementations
Source§impl<Key, Value> TypedColumnFamily<'_, Key, Value>
impl<Key, Value> TypedColumnFamily<'_, Key, Value>
Sourcepub fn zs_items_in_range_ordered<Range>(
&self,
range: Range,
) -> BTreeMap<Key, Value>where
Range: RangeBounds<Key>,
pub fn zs_items_in_range_ordered<Range>(
&self,
range: Range,
) -> BTreeMap<Key, Value>where
Range: RangeBounds<Key>,
Returns the keys and values in this column family in range
, in an ordered BTreeMap
.
Holding this iterator open might delay block commit transactions.
Source§impl<Key, Value> TypedColumnFamily<'_, Key, Value>
impl<Key, Value> TypedColumnFamily<'_, Key, Value>
Sourcepub fn zs_items_in_range_unordered<Range>(
&self,
range: Range,
) -> HashMap<Key, Value>where
Range: RangeBounds<Key>,
pub fn zs_items_in_range_unordered<Range>(
&self,
range: Range,
) -> HashMap<Key, Value>where
Range: RangeBounds<Key>,
Returns the keys and values in this column family in range
, in an unordered HashMap
.
Holding this iterator open might delay block commit transactions.
Source§impl<'cf, Key, Value> TypedColumnFamily<'cf, Key, Value>
impl<'cf, Key, Value> TypedColumnFamily<'cf, Key, Value>
Sourcepub fn new(
db: &'cf DiskDb,
cf_name: &str,
) -> Option<TypedColumnFamily<'cf, Key, Value>>
pub fn new( db: &'cf DiskDb, cf_name: &str, ) -> Option<TypedColumnFamily<'cf, Key, Value>>
Returns a new typed column family, if it exists in the database.
Sourcepub fn new_batch_for_writing(
self,
) -> WriteTypedBatch<'cf, Key, Value, DiskWriteBatch>
pub fn new_batch_for_writing( self, ) -> WriteTypedBatch<'cf, Key, Value, DiskWriteBatch>
Returns a typed writer for this column family for a new batch.
These methods are the only way to get a WriteTypedBatch
, which ensures
that the read and write types are consistent.
Sourcepub fn take_batch_for_writing(
self,
batch: DiskWriteBatch,
) -> WriteTypedBatch<'cf, Key, Value, DiskWriteBatch>
pub fn take_batch_for_writing( self, batch: DiskWriteBatch, ) -> WriteTypedBatch<'cf, Key, Value, DiskWriteBatch>
Wraps an existing write batch, and returns a typed writer for this column family.
These methods are the only way to get a WriteTypedBatch
, which ensures
that the read and write types are consistent.
Sourcepub fn with_batch_for_writing(
self,
batch: &mut DiskWriteBatch,
) -> WriteTypedBatch<'cf, Key, Value, &mut DiskWriteBatch>
pub fn with_batch_for_writing( self, batch: &mut DiskWriteBatch, ) -> WriteTypedBatch<'cf, Key, Value, &mut DiskWriteBatch>
Wraps an existing write batch reference, and returns a typed writer for this column family.
These methods are the only way to get a WriteTypedBatch
, which ensures
that the read and write types are consistent.
Sourcepub fn zs_is_empty(&self) -> bool
pub fn zs_is_empty(&self) -> bool
Returns true if this rocksdb column family does not contain any entries.
Sourcepub fn zs_get(&self, key: &Key) -> Option<Value>
pub fn zs_get(&self, key: &Key) -> Option<Value>
Returns the value for key
in this rocksdb column family, if present.
Sourcepub fn zs_contains(&self, key: &Key) -> bool
pub fn zs_contains(&self, key: &Key) -> bool
Check if this rocksdb column family contains the serialized form of key
.
Sourcepub fn zs_first_key_value(&self) -> Option<(Key, Value)>
pub fn zs_first_key_value(&self) -> Option<(Key, Value)>
Returns the lowest key in this column family, and the corresponding value.
Returns None
if this column family is empty.
Sourcepub fn zs_last_key_value(&self) -> Option<(Key, Value)>
pub fn zs_last_key_value(&self) -> Option<(Key, Value)>
Returns the highest key in this column family, and the corresponding value.
Returns None
if this column family is empty.
Sourcepub fn zs_next_key_value_from(&self, lower_bound: &Key) -> Option<(Key, Value)>
pub fn zs_next_key_value_from(&self, lower_bound: &Key) -> Option<(Key, Value)>
Returns the first key greater than or equal to lower_bound
in this column family,
and the corresponding value.
Returns None
if there are no keys greater than or equal to lower_bound
.
Sourcepub fn zs_next_key_value_strictly_after(
&self,
lower_bound: &Key,
) -> Option<(Key, Value)>
pub fn zs_next_key_value_strictly_after( &self, lower_bound: &Key, ) -> Option<(Key, Value)>
Returns the first key strictly greater than lower_bound
in this column family,
and the corresponding value.
Returns None
if there are no keys greater than lower_bound
.
Sourcepub fn zs_prev_key_value_back_from(
&self,
upper_bound: &Key,
) -> Option<(Key, Value)>
pub fn zs_prev_key_value_back_from( &self, upper_bound: &Key, ) -> Option<(Key, Value)>
Returns the first key less than or equal to upper_bound
in this column family,
and the corresponding value.
Returns None
if there are no keys less than or equal to upper_bound
.
Sourcepub fn zs_prev_key_value_strictly_before(
&self,
upper_bound: &Key,
) -> Option<(Key, Value)>
pub fn zs_prev_key_value_strictly_before( &self, upper_bound: &Key, ) -> Option<(Key, Value)>
Returns the first key strictly less than upper_bound
in this column family,
and the corresponding value.
Returns None
if there are no keys less than upper_bound
.
Sourcepub fn zs_forward_range_iter<Range>(
&self,
range: Range,
) -> impl Iterator<Item = (Key, Value)>where
Range: RangeBounds<Key>,
pub fn zs_forward_range_iter<Range>(
&self,
range: Range,
) -> impl Iterator<Item = (Key, Value)>where
Range: RangeBounds<Key>,
Returns a forward iterator over the items in this column family in range
.
Holding this iterator open might delay block commit transactions.
Sourcepub fn zs_reverse_range_iter<Range>(
&self,
range: Range,
) -> impl Iterator<Item = (Key, Value)>where
Range: RangeBounds<Key>,
pub fn zs_reverse_range_iter<Range>(
&self,
range: Range,
) -> impl Iterator<Item = (Key, Value)>where
Range: RangeBounds<Key>,
Returns a reverse iterator over the items in this column family in range
.
Holding this iterator open might delay block commit transactions.
Trait Implementations
Source§impl<'cf, Key, Value> Clone for TypedColumnFamily<'cf, Key, Value>
impl<'cf, Key, Value> Clone for TypedColumnFamily<'cf, Key, Value>
Source§fn clone(&self) -> TypedColumnFamily<'cf, Key, Value>
fn clone(&self) -> TypedColumnFamily<'cf, Key, Value>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl<Key, Value> Debug for TypedColumnFamily<'_, Key, Value>
impl<Key, Value> Debug for TypedColumnFamily<'_, Key, Value>
Source§impl<Key, Value> PartialEq for TypedColumnFamily<'_, Key, Value>
impl<Key, Value> PartialEq for TypedColumnFamily<'_, Key, Value>
Source§fn eq(&self, other: &TypedColumnFamily<'_, Key, Value>) -> bool
fn eq(&self, other: &TypedColumnFamily<'_, Key, Value>) -> bool
self
and other
values to be equal, and is used by ==
.