CursorSyncCapable<T extends DatumEntityInterface> mixin
The remote adapter serves incremental pulls from an opaque change
cursor — the natural fit for changes-feed backends (Firestore snapshot
tokens, DynamoDB streams, CouchDB since sequences, or a plain
monotonically increasing change counter).
This is the generalization of DeltaSyncCapable: a timestamp watermark is just one cursor encoding, but an opaque cursor also fits backends that hand out tokens instead of clocks, and it sidesteps clock skew entirely — no overlap window needed.
Engine behavior (when DatumConfig.enableDeltaSync is true, its
default): a null cursor means "from the beginning" — the adapter
returns the full dataset plus the current cursor, so even a user's first
sync goes through readChanges. The returned CursorPage.nextCursor is
persisted in the local sync metadata (customMetadata, key
__sync_cursor__) and handed back on the next cycle. When an adapter
mixes in both capabilities, the cursor path wins. Cycles that need the
complete remote id set (detectRemoteDeletions) still use a full
readAll and leave the cursor untouched.
The same soft-delete guidance as DeltaSyncCapable applies: isDeleted
flips must appear in the feed; hard deletions are invisible unless the
backend emits tombstones into the feed itself.
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
-
readChanges(
String? cursor, {String? userId, DatumSyncScope? scope}) → Future< CursorPage< T> > -
Returns entities changed since
cursor(null= from the beginning) and the cursor for the next call, honoringuserIdandscopethe same wayreadAlldoes. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited