Skip to content

Consolidated diff cursor#90

Merged
kris7t merged 3 commits into
graphs4value:mainfrom
csanadtelbisz:consolidated-diff-cursor
Jun 11, 2026
Merged

Consolidated diff cursor#90
kris7t merged 3 commits into
graphs4value:mainfrom
csanadtelbisz:consolidated-diff-cursor

Conversation

@csanadtelbisz

Copy link
Copy Markdown
Contributor

This PR adds a consolidated wrapper diff cursor that consolidates all changes by key: that is, the final diff is computed based on the wrapped diff cursor. It iterates (curses:) on the wrapped cursor on first move call and collects all changes by key to finally only include one diff entry per key. Iterating on a consolidated diff cursor only returns each affected key once and the from value is the value of the key in the original version of the map and the to value is the value of the key in the other version of the map.

This cursor is only useful when having a delta diff cursor which lists all change deltas: this way, a delta diff cursor may contain several transactions regarding the same key. Using the consolidated diff cursor, this internal behavior can be hidden.

The state-based map diff cursor overrides the consolidating function to skip the unnecessary consolidated wrapper.

@kris7t kris7t merged commit 53834ac into graphs4value:main Jun 11, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants