Ecto.Changeset.exclusion_constraint

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

exclusion_constraint(changeset, field, opts \\ [])

View Source

Checks for an exclusion constraint in the given field.

The exclusion constraint works by relying on the database to check if the exclusion constraint has been violated or not and, if so, Ecto converts it into a changeset error.

Options

  • :message - the message in case the constraint check fails, defaults to "violates an exclusion constraint"
  • :name - the constraint name. By default, the constraint name is inferred from the table + field. May be required explicitly for complex cases
  • :match - how the changeset constraint name is matched against the repo constraint, may be :exact or :suffix. Defaults to :exact. :suffix matches any repo constraint which ends_with? :name to this changeset constraint.