Trash.Repo.get_kept-exclamation-mark
You're seeing just the function
get_kept-exclamation-mark
, go back to Trash.Repo module for more information.
Link to this function
get_kept!(queryable, id, opts \\ [], repo)
Specs
get_kept!( queryable :: Ecto.Queryable.t(), id :: term(), opts :: Keyword.t(), repo :: atom() ) :: Ecto.Schema.t() | nil
Fetches a single kept result where the primary key matches the given id
.
Raises Ecto.NoResultsError
if no result was found.
Examples
iex> Trash.Repo.get_kept!(Post, 1, [], MyApp.Repo)
%Post{title: "Hello World", discarded_at: nil}
iex> Trash.Repo.get_kept!(Post, 2, [], MyApp.Repo)
** (Ecto.NoResultsError)