Ecto.Adapter.Schema.update

You're seeing just the callback update, go back to Ecto.Adapter.Schema module for more information.
Link to this callback

update(adapter_meta, schema_meta, fields, filters, returning, options)

View Source

Specs

update(
  adapter_meta(),
  schema_meta(),
  fields(),
  filters(),
  returning(),
  options()
) :: {:ok, fields()} | {:invalid, constraints()} | {:error, :stale}

Updates a single struct with the given filters.

While filters can be any record column, it is expected that at least the primary key (or any other key that uniquely identifies an existing record) be given as a filter. Therefore, in case there is no record matching the given filters, {:error, :stale} is returned.