DeltaSyncCapable<T extends DatumEntityInterface> mixin
The remote adapter can serve incremental pulls: instead of returning
the full dataset every cycle, it returns only entities modified at or
after a watermark (typically WHERE modified_at >= ? on the backend).
When a remote adapter mixes this in (and
DatumConfig.enableDeltaSync is true, its default), the sync engine's
pull phase calls readSince with the last sync watermark minus
DatumConfig.deltaSyncOverlap (clock-skew tolerance; re-delivered rows
are skipped by the strictly-newer check, so the overlap is idempotent).
The engine still falls back to a full readAll for the first sync of a
user and for cycles that need the complete remote id set
(detectRemoteDeletions).
Soft deletions (isDeleted flips bump modifiedAt) propagate through
deltas naturally. Hard remote deletions are invisible to an
incremental pull — keep using soft deletes, or enable
detectRemoteDeletions for full-scan cycles.
Which column to compare: prefer a server-maintained received-at
timestamp (set by the backend on every write, e.g. a server_updated_at
trigger column) over the entity's client-set modifiedAt. A device that
reconnects after a week pushes rows whose modifiedAt is a week old —
older than every other device's watermark — so a modifiedAt comparison
would silently miss them, while a server received-at is always newer than
any previously issued watermark.
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
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
readSince(
DateTime since, {String? userId, DatumSyncScope? scope}) → Future< List< T> > -
Returns entities modified at or after
since, honoringuserIdandscopethe same wayreadAlldoes. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited