Ecto.Repo.reload
You're seeing just the callback
reload
, go back to Ecto.Repo module for more information.
Specs
reload( struct_or_structs :: Ecto.Schema.t() | [Ecto.Schema.t()], opts :: Keyword.t() ) :: Ecto.Schema.t() | [Ecto.Schema.t() | nil] | nil
Reloads a given schema or schema list from the database.
When using with lists, it is expected that all of the structs in the list belong
to the same schema. Ordering is guaranteed to be kept. Results not found in
the database will be returned as nil
.
Example
MyRepo.reload(post)
%Post{}
MyRepo.reload([post1, post2])
[%Post{}, %Post{}]
MyRepo.reload([deleted_post, post1])
[nil, %Post{}]