feat: Implement merge changes method (#38)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Marcelo Soares <marcelo.me.soares@gmail.com>
This commit is contained in:
parent
0307094d58
commit
d04a56520c
5 changed files with 1752 additions and 105 deletions
|
|
@ -0,0 +1,13 @@
|
|||
### A remote CRDT change to merge.
|
||||
class: CrdtMergeChange
|
||||
sealed: true
|
||||
extends: BaseHlc
|
||||
fields:
|
||||
### The table receiving the change.
|
||||
tableName: String
|
||||
|
||||
### The domain row identifier receiving the change.
|
||||
uuidRowId: UuidValue
|
||||
|
||||
### The remote node that produced the change.
|
||||
uuidNodeId: UuidValue
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
### A remote tombstone update to merge.
|
||||
class: CrdtMergeDelete
|
||||
extends: CrdtMergeChange
|
||||
fields:
|
||||
### Whether the row is deleted or restored.
|
||||
isDeleted: bool
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
### A remote row insertion to merge.
|
||||
class: CrdtMergeInsert
|
||||
extends: CrdtMergeChange
|
||||
fields:
|
||||
### The serialized domain row payload for the insert.
|
||||
data: dynamic
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
### A set of remote CRDT changes to merge into the local database.
|
||||
class: CrdtMergeSet
|
||||
fields:
|
||||
### Remote row insertions.
|
||||
inserts: List<CrdtMergeInsert>
|
||||
|
||||
### Remote field updates.
|
||||
updates: List<CrdtMergeUpdate>
|
||||
|
||||
### Remote tombstone updates.
|
||||
deletes: List<CrdtMergeDelete>
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
### A remote field update to merge.
|
||||
class: CrdtMergeUpdate
|
||||
extends: CrdtMergeChange
|
||||
fields:
|
||||
### The updated database column name.
|
||||
columnName: String
|
||||
|
||||
### The serialized new value for the column.
|
||||
value: dynamic
|
||||
Loading…
Reference in a new issue