DatumSyncOperation<T extends DatumEntityInterface> class

Represents a single pending operation to be synchronized.

Implementers

Constructors

DatumSyncOperation({required String id, required String userId, required String entityId, required DatumOperationType type, required DateTime timestamp, String? entityTable, T? data, Map<String, dynamic>? delta, int retryCount = 0, int sizeInBytes = 0})
Creates a DatumSyncOperation.
const
DatumSyncOperation.fromMap(Map<String, dynamic> map, T fromJsonT(Map<String, dynamic> json))
Creates a DatumSyncOperation from a map.
factory

Properties

data → T?
The full data payload of the entity.
final
delta → Map<String, dynamic>?
A map of only the fields that have changed for an update operation.
final
entityId → String
The ID of the entity this operation targets.
final
entityTable → String?
The entity table/type this operation belongs to (e.g. the entity type name or configured table name).
final
hashCode → int
The hash code for this object.
no setterinherited
id → String
A unique identifier for this operation.
final
props → List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setter
retryCount → int
The number of times this operation has been retried.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sizeInBytes → int
The size of the data payload in bytes.
final
stringify → bool
If set to true, the toString method will be overridden to output this instance's props.
no setter
timestamp → DateTime
The timestamp when the operation was created.
final
type → DatumOperationType
The type of operation (create, update, delete).
final
userId → String
The ID of the user this operation belongs to.
final

Methods

copyWith({String? id, String? userId, String? entityId, String? entityTable, DatumOperationType? type, T? data, Map<String, dynamic>? delta, DateTime? timestamp, int? retryCount, int? sizeInBytes}) → DatumSyncOperation<T>
Creates a copy of this operation with updated fields.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → String
Converts the operation to a JSON string.
toMap() → Map<String, dynamic>
Converts the operation to a map representation.
toString() → String
A string representation of this object.
inherited

Operators

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