View Source Ash.Resource.Identity (ash v3.0.2)

Represents a unique constraint on a resource

Data layers should (and all built in ones do), discount nil or null (in the case of postgres) values when determining if a unique constraint matches. This often means that you should prefer to use identities with non-nullable columns.

Eventually, features could be added to support including nil or null values, but they would need to include a corresponding feature for data layers.



@type t() :: %Ash.Resource.Identity{
  all_tenants?: boolean(),
  description: String.t() | nil,
  eager_check?: term(),
  eager_check_with: term(),
  keys: [atom()],
  message: term(),
  name: atom(),
  pre_check?: term(),
  pre_check_with: term()