Ecto.Associations.Preloader
This module provides assoc selector merger.
Summary
run(original, repo, fields, pos \\ []) | Loads all associations on the result set according to the given fields.
|
Functions
Specs:
- run([Ecto.Model.t], atom, [atom | tuple], [non_neg_integer]) :: [Ecto.Model.t]
Loads all associations on the result set according to the given fields.
fields
is a list of fields that can be nested in rose tree structure:
node :: {atom, [node | atom]}
(see Ecto.Query.Builder.Preload.normalize/1
).
pos
is a list of indices into tuples and lists that locate the concerned
model.
See Ecto.Query.preload/2
.