DVMutation class

One write made on the device, waiting to reach the server.

Constructors

DVMutation({required String mutationId, required int sequence, required String table, required String op, required Object key, required Map<String, Object?> values, required DateTime deviceTime, required DateTime correctedTime, DVRecord? base, String? rejection})

Properties

base → DVRecord?
The server's record as this device last knew it, attached at replay so a queued write is checked against what the server acknowledged rather than against an earlier local write.
final
correctedTime → DateTime
deviceTime corrected by the offset the device last observed from the server. This is the stamp a declared clock compares.
final
deviceTime → DateTime
The device clock when the write was made — what its user saw.
final
hashCode → int
The hash code for this object.
no setterinherited
isDelete → bool
no setter
key → Object
final
mutationId → String
Sent with every attempt, so the server can tell a resend from a second write.
final
op → String
opWrite or opDelete.
final
rejection → String?
Why the server refused it, for a dead-lettered mutation.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sequence → int
Order on this device. Replay follows it.
final
table → String
final
values → Map<String, Object?>
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, Object?>
This mutation as a device sends it.
toString() → String
A string representation of this object.
override
withBase(DVRecord? base) → DVMutation

Operators

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

Static Methods

fromJson(Map<String, Object?> json) → DVMutation
A mutation as it arrived. The caller decides whether to trust it: a device names its own table and key, and nothing here checks either.

Constants

opDelete → const String
opWrite → const String