SyncHistoricChanges class

Helper to retrieve (and optionally apply) historical changes for a given SyncCollectionConfig.

This utility performs a sync:get_changes ACK call to the sync server and returns a structured summary. If applyLocally is true, changes are merged into the provided Realm instance using the same conflict rules as live sync:

  • skip if local sync_updated_at >= remote.timestamp
  • delete if operation == 'delete'
  • upsert otherwise

NOTE: For deserialization it prefers config.fromServerMap; if absent it automatically uses the generated fromEJson() method which infers the correct type from the data structure.

Constructors

SyncHistoricChanges({required Socket socket, required dynamic realm, required String userId})

Properties

hashCode int
The hash code for this object.
no setterinherited
realm → dynamic
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
socket → Socket
final
userId String
final

Methods

getChangesFor<T extends dynamic>({required SyncCollectionConfig<T> config, int? since, int limit = 500, String? filterExpr, List? args, bool applyLocally = true}) Future<HistoricChangesResult>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited