ObjectMergeStrategy class
A MergeStrategy that treats each document as a single, atomic CRDT record.
Concurrent edits to the same document resolve last-write-wins as a whole: the edit with the higher Hybrid Logical Clock wins entirely and the other is discarded. Edits to different documents always both survive.
This is the default strategy. Choose it when a document has cross-field invariants that a partial merge could violate.
- Implemented types
Constructors
- ObjectMergeStrategy()
-
Creates a whole-document merge strategy.
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
fields(
Map< String, dynamic> document) → Iterable<FieldSpec> -
Decomposes
documentinto the CRDT records it should be stored as.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
typeAt(
String path) → CrdtType -
The CrdtType this strategy assigns to the field at
path.override -
unflatten(
Iterable< FieldValue> rows) → Map<String, dynamic> -
Rebuilds the document map from its live field
rows(path → value), the inverse of fields.override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited