Endon.find
You're seeing just the function
find
, go back to Endon module for more information.
Specs
find(integer() | [integer()], keyword()) :: [Ecto.Schema.t()] | Ecto.Schema.t()
Fetches one or more structs from the data store based on the primary key(s) given.
Much like fetch/2
, except an error is raised if the record(s) can't be found.
If one primary key is given, then one struct will be returned (or a Ecto.NoResultsError
raised if a match isn't found).
If more than one primary key is given in a list, then all of the structs with those ids
will be returned (and a Ecto.NoResultsError
will be raised if any one of the primary
keys can't be found).
Options
:preload
- A list of fields to preload, much likeEcto.Repo.preload/3