ash v1.6.3 API Reference
Modules
Ash Framework
An Api allows you to interact with your resources, and holds non-resource-specific configuration.
A small DSL for declaring APIs
Represents a resource in an API
Ensures that all resources for a given api are compiled.
Validates that join_attributes
on many to many relationships exist on the join resource
Ensures that all related resources are included in an API.
Validates that all relationships point to valid fields
The interface for an ash authorizer
Changesets are used to create and update data in Ash.
The interface for being an ash data layer.
An ETS (Erlang Term Storage) backed Ash Datalayer, for testing.
An Mnesia backed Ash Datalayer.
Declares a DSL entity.
An extension to the Ash DSL.
Declares a DSL section.
A transformer manipulates and/or validates the entire DSL state of a resource.
Used when an invalid value is provided for an attribute change
Used when a change is provided that covers multiple attributes/relationships
Used when an invalid value is provided for a relationship change
Used when a change is provided for an attribute that does not exist
Used when a change is provided for an relationship that does not exist
Used when a change fails for an unknown reason
Used when a DSL is incorrectly configured.
Used when authorization for an action fails
Used when unreachable code/conditions are reached in the framework
Used when an unknown/generic framework error occurs
Used when unreachable code/conditions are reached in the framework
Used when the sycnrhonous engine cannot proceed
The top level invalid error
Used when multiple requests with the same path are passed to the internal engine
Used when a request expresses a dependency on another request that doesn't exist
Used when an invalid primary key is given to an Api's get
Used when an action name is provided that doesn't exist
Used when a resource or alias is provided that doesn't exist
Used when the datalayer does not support aggregates, or filtering/sorting them
Used when an invalid value is provided for a filter
Used when an invalid limit is provided
Used when an invalid load is provided
Used when an invalid offset is provided
Used when an invalid sort order is provided
Used when an attribute that doesn't exist is used in a query
Used when a key in a filter contains something that is neither an attribute or a relationship
Used when a filter predicate that does not exist is referenced
Used when a relationship is filtered and the destination does not have a default read action
Used when attempting to sort on a field that cannot be used for sorting
Used when the datalayer does not support a provided predicate
Used when an invalid query is provided in a side load
Used when attempting to side load a relationship that does not exist
The top level unknown error container
The representation of a filter in Ash.
Represents a boolean expression
Represents the negation of the contained expression
Represents a filter predicate
A predicate for strict value equality
A predicate for a value being greater than the provided value
A predicate for a value being in a list of provided values
A predicate for a value being greater than the provided value
Checks a record to see if it matches a filter statement.
Used when an aggregate or relationship hasn't been loaded.
Utilties around constructing/manipulating ash queries.
Represents an aggregated association value
A resource is a static definition of an entity in your system.
Represents a create action on a resource.
Represents a destroy action on a resource.
Represents a read action on a resource.
Represents a update action on a resource.
Represents a named aggregate on the resource that can be loaded
Represents an attribute on a resource
The built in resource DSL. The four core DSL components of a resource are
Represents a belongs_to relationship on a resource
Represents a has_many relationship on a resource
Represents a has_one relationship on a resource
Represents a many_to_many relationship on a resource
Creates the attribute for belongs_to relationships that have define_field?: true
Sets the default source_field
for belongs_to attributes
Validates the primary key of a resource
Creates an automatically named has_many
relationship for each many_to_many.
Creates/validates the primary action configuration
Sets the source
key on relationships to be the resource they were defined on
Represents a validation in Ash.
Built in validations that are available to all resources
Validates that the provided attribute is non-nil
This behaviour is a superset of the Ecto.Type behavior, that also contains api level information, like what kinds of filters are allowed. Eventually, this may be used for composite types or serialization.
Represents a boolean.
Represents a date in the database
Represents a simple integer
Stores a string in the database
Represents a raw elixir term in the database
Represents a UUID.
Represents a utc datetime
Mix Tasks
Generates a .formatter.exs from a list of extensions, and writes it.