View Source Ash.Resource.Identity (ash v2.21.12)

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.

Summary

Types

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

Functions