Skip to main content

DupReadCursor

Trait DupReadCursor 

Source
pub trait DupReadCursor<'txn, T: DupTable>: ReadCursor<'txn, T> {
    // Required methods
    fn first_duplicate(&mut self) -> Option<T::Value>;
    fn last_duplicate(&mut self) -> Option<T::Value>;
    fn next_duplicate(&mut self) -> Option<Row<T>>;
    fn next_no_duplicate(&mut self) -> Option<Row<T>>;
    fn prev_duplicate(&mut self) -> Option<Row<T>>;
    fn prev_no_duplicate(&mut self) -> Option<Row<T>>;
    fn set_subkey(
        &mut self,
        key: &T::Key,
        subkey: &DupSubKey<T>,
    ) -> Option<T::Value>
       where T::Value: DupTableValue;
    fn set_lowerbound_both(
        &mut self,
        key: &T::Key,
        subkey: &DupSubKey<T>,
    ) -> Option<Row<T>>
       where T::Value: DupTableValue;
    fn set_lowerbound_subkey(
        &mut self,
        key: &T::Key,
        subkey: &DupSubKey<T>,
    ) -> Option<T::Value>
       where T::Value: DupTableValue;
    fn count_duplicates(&mut self) -> usize;
    fn into_iter_dup_of(self, key: &T::Key) -> Self::IntoIter;
}

Required Methods§

Source

fn first_duplicate(&mut self) -> Option<T::Value>

Positions the cursor at the first duplicate value for the current key.

Source

fn last_duplicate(&mut self) -> Option<T::Value>

Positions the cursor at the last duplicate value for the current key.

Source

fn next_duplicate(&mut self) -> Option<Row<T>>

Positions the cursor at the next duplicate value for the current key. This does not jump keys.

Source

fn next_no_duplicate(&mut self) -> Option<Row<T>>

Positions the cursor at the first duplicate of the next key.

Source

fn prev_duplicate(&mut self) -> Option<Row<T>>

Positions the cursor at the previous duplicate value for the current key.

Source

fn prev_no_duplicate(&mut self) -> Option<Row<T>>

Positions the cursor at the last duplicate of the previous key.

Source

fn set_subkey( &mut self, key: &T::Key, subkey: &DupSubKey<T>, ) -> Option<T::Value>
where T::Value: DupTableValue,

Positions the cursor at the entry with a given key and subkey.

Source

fn set_lowerbound_both( &mut self, key: &T::Key, subkey: &DupSubKey<T>, ) -> Option<Row<T>>
where T::Value: DupTableValue,

Positions the cursor at the first duplicate entry that has a key >= key && subkey >= subkey.

Source

fn set_lowerbound_subkey( &mut self, key: &T::Key, subkey: &DupSubKey<T>, ) -> Option<T::Value>
where T::Value: DupTableValue,

Positions the cursor at the first duplicate entry that has a key == key && subkey >= subkey.

Source

fn count_duplicates(&mut self) -> usize

Counts the number of duplicates (linear operation!).

Source

fn into_iter_dup_of(self, key: &T::Key) -> Self::IntoIter

Iterates over all duplicates of the given key.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<'txn, Kind: TransactionKind, T: DupTable> DupReadCursor<'txn, T> for MdbxCursor<'txn, Kind, T>

Source§

impl<'txn, T: DupTable> DupReadCursor<'txn, T> for CursorProxy<'txn, T>