Constructors
- Crdt()
Properties
- canonicalTime ↔ Hlc
-
Represents the latest logical time seen in the stored data.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- nodeId → String
-
Get this CRDT's node id
no setter
-
onTablesChanged
→ Stream<
({Hlc hlc, Iterable< String> tables})> -
Emits a list of the tables affected by changes in the database and the
timestamp at which they happened.
Useful for guaranteeing atomic merges across multiple tables.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
getChangeset(
{Iterable< String> ? onlyTables, String? onlyNodeId, String? exceptNodeId, Hlc? modifiedOn, Hlc? modifiedAfter}) → FutureOr<CrdtChangeset> -
Get a
Changeset
using the providedchangesetQueries
. -
getLastModified(
{String? onlyNodeId, String? exceptNodeId}) → FutureOr< Hlc> - Returns the last modified timestamp, optionally filtering for or against a specific node id. Useful to get "modified since" timestamps for synchronization. Returns Hlc.zero if no timestamp is found.
-
merge(
CrdtChangeset changeset) → FutureOr< void> -
Merge
changeset
with the local dataset. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onDatasetChanged(
Iterable< String> affectedTables, Hlc hlc) → void - Notifies listeners and updates the canonical time.
-
toString(
) → String -
A string representation of this object.
inherited
-
validateChangeset(
CrdtChangeset changeset) → Hlc - Checks if changeset is valid. This method is intended for implementations and shouldn't generally be called from outside.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited