source/core/schema/datum_field_spec library

Runtime field descriptors — the no-codegen alternative to datum_generator's per-field output.

A DatumFieldSpec IS-A DatumQueryField, so it works everywhere the typed query surface already accepts one (whereField, orderByField, equalTo, …) while additionally carrying the metadata that powers typed map reads, SQLite column derivation, and auto-migration diffing.

Classes

DatumCoreFields<E extends DatumEntityInterface>
The six standard sync fields every DatumEntityInterface carries, as individually-typed specs plus an all list to spread into a schema:
DatumFieldSpec<E, V>
A full runtime descriptor for one serialized field of entity E with Dart value type V.

Enums

DatumCoreRole
Which of the six standard sync fields a spec represents, when built by datumCoreFieldSpecs. Payload fields have no role.

Functions

datumCoreFieldSpecs<E extends DatumEntityInterface>({String id = 'id', String userId = 'userId', String modifiedAt = 'modifiedAt', String createdAt = 'createdAt', String version = 'version', String isDeleted = 'isDeleted', DatumFieldCodec<DateTime> dateCodec = DatumFieldCodec.dateTimeIso}) DatumCoreFields<E>
Builds the six standard sync-field specs with camelCase keys by default (matching SqliteLocalAdapter's core columns). Every key is overridable for snake_case stores, and dateCodec controls how the two timestamps are persisted (ISO-8601 by default, with lenient decode that also accepts epoch milliseconds).

Typedefs

DatumFieldGetter<E, V> = V Function(E entity)
Reads the value of this field from an entity (for DatumSchema.toMap).