EctoNeo4j v0.6.2 Ecto.Adapters.Neo4j.Behaviour.Repo View Source
Link to this section Summary
Functions
Preloads all associations on the given struct or structs.
Link to this section Functions
Link to this function
preload(struct_or_structs_or_nil, preloads, opts \\ [])
View Source
preload(struct_or_structs_or_nil, preloads, opts \\ [])
View Source
preload(
nil | [Ecto.Schema.t()] | Ecto.Schema.t(),
atom() | [atom()],
Keyword.t()
) :: nil | nil | [Ecto.Schema.t()] | Ecto.Schema.t()
preload( nil | [Ecto.Schema.t()] | Ecto.Schema.t(), atom() | [atom()], Keyword.t() ) :: nil | nil | [Ecto.Schema.t()] | Ecto.Schema.t()
Preloads all associations on the given struct or structs.
Unsupported features:
- Nested associaiton preloads
- custom query preloads
Examples
# Use a single atom to preload an association
posts = Repo.preload posts, :comments
# Use a list of atoms to preload multiple associations
posts = Repo.preload posts, [:comments, :authors]