Specs
primary_action(Ash.resource(), Ash.action_type()) :: Ash.action() | nil
Returns the primary action of a given type
A resource is a static definition of an entity in your system.
Resource DSL documentation: Ash.Dsl
Returns the action with the matching name and type on the resource
Returns all actions of a resource
Get an attribute name from the resource
Returns all attributes of a resource
A list of authorizers to be used when accessing
The data layer of the resource, or nil if it does not have one
Whether ornot the data layer supports a specific feature
Custom filters suppoted by the data layer of the resource
Whether or not the data layer for the resource is currently in a transaction
Returns the primary action of a given type
Returns the primary action of the given type
A list of field names corresponding to the primary key
Get a relationship by name or path
Whether or not a given module is a resource module
Rolls back the current transaction
Wraps the execution of the function in a transaction with the resource's datalayer
A list of all validations for the resource
action(Ash.resource(), atom(), Ash.action_type()) :: Ash.action() | nil
Returns the action with the matching name and type on the resource
actions(Ash.resource()) :: [Ash.action()]
Returns all actions of a resource
attribute(Ash.resource(), String.t() | atom()) :: Ash.attribute() | nil
Get an attribute name from the resource
attributes(Ash.resource()) :: [Ash.attribute()]
Returns all attributes of a resource
authorizers(Ash.resource()) :: [module()]
A list of authorizers to be used when accessing
data_layer(Ash.resource()) :: Ash.data_layer()
The data layer of the resource, or nil if it does not have one
data_layer_can?(Ash.resource(), Ash.DataLayer.feature()) :: boolean()
Whether ornot the data layer supports a specific feature
data_layer_filters(Ash.resource()) :: map()
Custom filters suppoted by the data layer of the resource
in_transaction?(Ash.resource()) :: boolean()
Whether or not the data layer for the resource is currently in a transaction
primary_action(Ash.resource(), Ash.action_type()) :: Ash.action() | nil
Returns the primary action of a given type
primary_action!(Ash.resource(), Ash.action_type()) :: Ash.action() | no_return()
Returns the primary action of the given type
primary_key(Ash.resource()) :: [atom()]
A list of field names corresponding to the primary key
relationship(Ash.resource(), atom() | [atom()]) :: Ash.relationship() | nil
Get a relationship by name or path
relationships(Ash.resource()) :: [Ash.relationship()]
Whether or not a given module is a resource module
rollback(Ash.resource(), term()) :: no_return()
Rolls back the current transaction
transaction(Ash.resource(), (() -> term())) :: term()
Wraps the execution of the function in a transaction with the resource's datalayer
validations(Ash.resource()) :: [Ash.validation()]
A list of all validations for the resource
validations(Ash.resource(), :create | :update | :destroy) :: [Ash.validation()]