source/core/schema/datum_relation_spec library

Typed relation descriptors — the no-codegen way to declare, load, and fetch relations without stringly-typed names, foreign keys, or casts.

A DatumRelationSpec binds together, at the type level, everything a relation needs: the owning entity E, the related entity R, the relation name, and the foreign key as a DatumFieldSpec — so the same declaration that powers queries and auto-migration also anchors the relation graph, and a typo in any of them fails at compile time.

Classes

DatumRelationSpec<E extends RelationalDatumEntity, R extends DatumEntityInterface>
A typed, declare-once relation between entities E and R.

Enums

DatumRelationKind
The shape of a typed relation.

Extensions

DatumRelationSpecNames on Iterable<DatumRelationSpec<RelationalDatumEntity, DatumEntityInterface>>
withRelated: from typed specs: withRelated: [Project.ticketsRel].names.

Functions

datumRelationsFor<E extends RelationalDatumEntity>(E entity, List<DatumRelationSpec<E, DatumEntityInterface>> specs) Map<String, Relation<DatumEntityInterface>>
Builds an entity's relations map from typed specs: