RelationLoader<T extends DatumEntityInterface> class

Internal collaborator of DatumManager that loads and stitches related entities: eager loading (withRelated), relation-schema registration, and the internals of the deprecated fetchRelated/watchRelated APIs.

This class is an implementation detail of the manager and is NOT exported from the package barrel. The public methods stay on DatumManager and delegate here.

Constructors

RelationLoader({required DatumManager<T> manager, required DatumLogger logger, required Future<void> recurseIntoRelated(DatumManager<DatumEntityInterface> relatedManager, List<DatumEntityInterface> entities, List<String> relations, DataSource source, String? userId)})

Properties

hashCode int
The hash code for this object.
no setterinherited
manager DatumManager<T>
The owning manager (adapters are reached through it).
final
recurseIntoRelated Future<void> Function(DatumManager<DatumEntityInterface> relatedManager, List<DatumEntityInterface> entities, List<String> relations, DataSource source, String? userId)
Recurses into nested relation paths on a related manager.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

fetchAndStitchRelations(List<T> entities, List<String> relations, DataSource source, String? userId) Future<void>
fetchRelated<R extends DatumEntityInterface>(T parent, String relationName, {DataSource source = DataSource.local}) Future<List<R>>
Fetches related entities for a given parent entity (the internals behind the deprecated DatumManager.fetchRelated).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerRelationSchema(DatumEntityInterface entity) → void
Registers a relational entity's schema in DatumRelationSchema the first time an instance is seen, enabling instance-free relation traversal (#21).
toString() String
A string representation of this object.
inherited
watchRelated<R extends DatumEntityInterface>(T parent, String relationName) Stream<List<R>>?
Reactively watches related entities for a given parent entity (the internals behind the deprecated DatumManager.watchRelated).

Operators

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