API Reference ash_versioned v#0.2.0
Copy MarkdownModules
Resolves the provided actor using the actor configuration.
Ensures that actor attribution is applied to the changeset extracted from
context.actor. See AshVersioned.ActorValue, AshVersioned.Resource.BelongsToActor,
AshVersioned.Resource.ReferenceActor for more details.
Rejects any create call that has upsert?: true at runtime (see
AshVersioned.Transformers.WireActions).
Determines whether an Ash.Resource.Identity is usable on an AshVersioned.Resource.
All user-defined identities on a versioned resource must conform to exactly one of these
constraints
Scopes read actions to include latest_attribute == true, and if archive is declared
on the resource, archived == false.
The default transform function for a reference_actor field.
Adds belongs_to_versioned, has_one_versioned, and has_many_versioned to the
relationships section of any resource for relationships to AshVersioned.Resource
resources.
Configures a resource for versioning. The source table gets a stable resource identifier, a version number, and a flag marking a row as the latest version, and mutations append new rows instead of updating in place.
Represents the archive entity declared inside the versioning DSL section of
AshVersioned.Resource.
Represents a belongs_to_actor declared inside the versioning DSL section of
AshVersioned.Resource.
Represents the identity entity declared inside the versioning DSL section of
AshVersioned.Resource.
Introspection helpers for the AshVersioned.Resource extension.
Represents the latest entity declared inside the versioning DSL section of
AshVersioned.Resource.
Implements the core atomic primitive for AshVersioned.Resources: mark the current
latest row as stale and insert a new version in a single transaction. This works for all
update actions and, if the resource has archive set, destroy actions.
Represents a reference_actor field declared inside the versioning DSL section of
AshVersioned.Resource.
Represents the version entity declared inside the versioning DSL section of
AshVersioned.Resource.
Resolves the AshVersioned.Resource entities for identity, version, latest, and
(optionally) archived. For the required versioning attributes, defaults are provided
if not declared. These are used to configure the resource for versioning, defining the
attributes and default read scopes.
Resolves every belongs_to_versioned relationship.
Wires up the actions and overrides that make versioning work.
Ensures that every action named in exclude_update_actions is a defined update action
on the resource, and that every action named in exclude_read_actions is a defined read
action.
An AshVersioned.Resource resource must declare at least one create action.
Every identity on an AshVersioned.Resource resource must pass
AshVersioned.IdentityScoping.safe?/4.
AshArchival.Resource and AshVersioned.Resource cannot be combined.
AshVersioned does not support resource-supplied manual update or destroy action
implementations.
An AshVersioned.Resource is not deletable. Resources can be declared with archive,
which turns destroy actions to soft deletions supported by AshVersioned.
An AshVersioned.Resource must declare a generated surrogate primary key. AshVersioned
does not support natural or composite primary keys.
Verifies that every belongs_to_versioned, has_one_versioned, and
has_many_versioned relationship points to an AshVersioned.Resource, and that every
belongs_to_versioned joins on the destination's identity attribute.
Verifies every attribute AshVersioned relies on, whether generated or adopted.
Shared configuration for relationships to versioned resources, used by
belongs_to_actor (AshVersioned.Resource) and by belongs_to_versioned,
has_one_versioned, and has_many_versioned (AshVersioned.Relationships).
Mix Tasks
Verifies that a pending release is internally consistent.