pub struct IndexOverlay(/* private fields */);Expand description
Overlay for tracking uncommited transaction changes to indexes on a table.
1 Table has 1 IndexOverlay, which has n BTreeMaps for each index
Implementations§
Source§impl IndexOverlay
impl IndexOverlay
Sourcepub fn insert(
&mut self,
indexed_columns: &[&'static str],
indexed_values: Vec<Value>,
pk: Value,
)
pub fn insert( &mut self, indexed_columns: &[&'static str], indexed_values: Vec<Value>, pk: Value, )
Inserts a record into the index overlay for the specified indexed columns, indexed values, and primary key.
The primary key is added to the set of primary keys associated with the indexed values in the added map.
If the primary key was previously in the removed set for these values, it is removed from there.
Sourcepub fn delete(
&mut self,
indexed_columns: &[&'static str],
indexed_values: Vec<Value>,
pk: Value,
)
pub fn delete( &mut self, indexed_columns: &[&'static str], indexed_values: Vec<Value>, pk: Value, )
Removes a record from the index overlay for the specified indexed columns, indexed values, and primary key.
The primary key is added to the set of primary keys associated with the indexed values in the removed map.
If the primary key was previously in the added set for these values, it is removed from there.
Sourcepub fn added_pks(
&self,
indexed_columns: &[&'static str],
indexed_values: &[Value],
) -> HashSet<Value>
pub fn added_pks( &self, indexed_columns: &[&'static str], indexed_values: &[Value], ) -> HashSet<Value>
Returns the set of primary keys added for the given index columns and indexed values.
Returns an empty set if no entries exist.
Sourcepub fn removed_pks(
&self,
indexed_columns: &[&'static str],
indexed_values: &[Value],
) -> HashSet<Value>
pub fn removed_pks( &self, indexed_columns: &[&'static str], indexed_values: &[Value], ) -> HashSet<Value>
Returns the set of primary keys removed for the given index columns and indexed values.
Returns an empty set if no entries exist.
Sourcepub fn added_pks_in_range(
&self,
indexed_columns: &[&'static str],
start: Option<&[Value]>,
end: Option<&[Value]>,
) -> HashSet<Value>
pub fn added_pks_in_range( &self, indexed_columns: &[&'static str], start: Option<&[Value]>, end: Option<&[Value]>, ) -> HashSet<Value>
Returns the set of primary keys added within the given inclusive key range.
Sourcepub fn removed_pks_in_range(
&self,
indexed_columns: &[&'static str],
start: Option<&[Value]>,
end: Option<&[Value]>,
) -> HashSet<Value>
pub fn removed_pks_in_range( &self, indexed_columns: &[&'static str], start: Option<&[Value]>, end: Option<&[Value]>, ) -> HashSet<Value>
Returns the set of primary keys removed within the given inclusive key range.
Trait Implementations§
Source§impl Clone for IndexOverlay
impl Clone for IndexOverlay
Source§fn clone(&self) -> IndexOverlay
fn clone(&self) -> IndexOverlay
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more