Ecto.Changeset.fetch_change

You're seeing just the function fetch_change, go back to Ecto.Changeset module for more information.
Link to this function

fetch_change(changeset, key)

View Source

Specs

fetch_change(t(), atom()) :: {:ok, term()} | :error

Fetches a change from the given changeset.

This function only looks at the :changes field of the given changeset and returns {:ok, value} if the change is present or :error if it's not.

Examples

iex> changeset = change(%Post{body: "foo"}, %{title: "bar"})
iex> fetch_change(changeset, :title)
{:ok, "bar"}
iex> fetch_change(changeset, :body)
:error