Ecto.Associations.Preloader

This module provides assoc selector merger.

Source

Summary

run(original, repo, fields, pos \\ [])

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

Functions

run(original, repo, fields, pos \\ [])

Specs:

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.

Source