Skip to main content

Module executor

Module executor 

Source
Expand description

Runtime for relation loading.

Fetches children keyed by parent PK, buckets by FK, and hands back a map the per-model crate::traits::ModelRelationLoader::load_relation closure uses to stitch results onto the parent slice.

The executor is the only place in the pipeline that issues a secondary query on behalf of .include(). It deliberately avoids JOINs so the parent hydration path stays the same as a bare find_many() — no row-multiplication, no column-name collisions, one network round-trip per included relation.

Functions§

load_has_many
Fetch children for a HasMany (or HasOne) relation and bucket by the FK column value turned into a stable string key.