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
EandR.
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< specs) → Map<E, DatumEntityInterface> >String, Relation< DatumEntityInterface> > -
Builds an entity's
relationsmap from typed specs: