Struct re_data_store::StoreDiff
source · pub struct StoreDiff {
pub kind: StoreDiffKind,
pub row_id: RowId,
pub times: Vec<(Timeline, TimeInt)>,
pub entity_path: EntityPath,
pub cells: IntMap<ComponentName, DataCell>,
}Expand description
Describes an atomic change in the Rerun DataStore: a row has been added or deleted.
From a query model standpoint, the DataStore always operates one row at a time:
- The contents of a row (i.e. its columns) are immutable past insertion, by virtue of
RowIds being unique and non-reusable. - Similarly, garbage collection always removes all the data associated with a row in one go: there cannot be orphaned columns. When a row is gone, all data associated with it is gone too.
Refer to field-level documentation for more information.
Fields§
§kind: StoreDiffKindAddition or deletion?
The store’s internals are opaque and don’t necessarily reflect the query model (e.g. there might be data in the store that cannot by reached by any query).
A StoreDiff answers a logical question: “does there exist a query path which can return
data from that row?”.
An event of kind deletion only tells you that, from this point on, no query can return data from that row. That doesn’t necessarily mean that the data is actually gone, i.e. don’t make assumptions of e.g. the size in bytes of the store based on these events. They are in “query-model space” and are not an accurate representation of what happens in storage space.
row_id: RowIdWhat’s the row’s RowId?
RowIds are guaranteed to be unique within a single DataStore.
Put another way, the same RowId can only appear twice in a StoreDiff event:
one addition and (optionally) one deletion (in that order!).
times: Vec<(Timeline, TimeInt)>The time data associated with that row.
Since insertions and deletions both work on a row-level basis, this is guaranteed to be the same value for both the insertion and deletion events (if any).
This is not a TimePoint for performance reasons.
entity_path: EntityPathThe EntityPath associated with that row.
Since insertions and deletions both work on a row-level basis, this is guaranteed to be the same value for both the insertion and deletion events (if any).
cells: IntMap<ComponentName, DataCell>All the DataCells associated with that row.
Since insertions and deletions both work on a row-level basis, this is guaranteed to be the same set of values for both the insertion and deletion events (if any).