DbValueCodec class abstract final

Encodes raw Dart values into protocol JSON values and back.

Plain JSON primitives are used where they are lossless. Everything else is a tagged object {"$type": ...}:

Raw value Wire
null, bool, String as is
int (JS-safe range) number
int (outside JS-safe) {"$type":"bigint","value":"…"}
double (finite) number
double (NaN/∞) {"$type":"real","value":"NaN"}
long String {"$type":"text","preview":"…","size":n,"truncated":true}
Uint8List {"$type":"blob","size":n,"preview":"<base64>","truncated":b}
DateTime {"$type":"dateTime","value":"<ISO-8601>"}
Map / List {"$type":"json","value":…}
masked {"$type":"masked"}
anything else {"$type":"unknown","display":"…"}

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
toString() → String
A string representation of this object.
inherited

Operators

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

Static Methods

decode(Object? wire) → Object?
Decodes a wire value supplied by a client for a write or filter.
encode(Object? value, [ValueEncodingOptions options = const ValueEncodingOptions()]) → Object?

Constants

maxSafeInteger → const int
typeKey → const String