Ecto.Model.OptimisticLock.optimistic_lock/1

Parsed documentation:
View on GitHub
Specifies a field to use with optimistic locking.

This macro specifies a `field` that will be used to implement the
optimistic-locking technique described in the docs for this module.

`optimistic_lock/1` can be used multiple times per model.

## Examples

    defmodule Note do
      use Ecto.Model

      schema "notes" do
        add :title, :string
        add :body, :text
        add :optlock, :integer, default: 1
      end

      optimistic_lock :optlock
    end
No suggestions.
Please help! Open an issue on GitHub if this assessment is incorrect.