@spec primary_action!(Ash.Resource.t(), Ash.Resource.Actions.action_type()) :: Ash.Resource.Actions.action() | no_return()
Returns the primary action of the given type
Introspection for resources
Returns the action with the matching name and type on the resource
Returns all actions of a resource
Get an aggregate by name
Returns all aggregates 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
Get a calculation by name
Returns all calculations of a resource
A list of all changes for the resource
Returns the configured default actions
Get a field from a resource by name
A list of identities for the resource
Get an identity by name from the resource
Returns true if the load or path to load has been loaded
Get the multitenancy strategy for a resource
A list of notifiers to be used when accessing
Returns the primary action of the given type
Returns the primary action of a given type
A list of field names corresponding to the primary key
Get an aggregate by name
Returns all public aggregates of a resource
Get a public attribute name from the resource
Returns all public attributes of a resource
Get a public calculation by name
Returns all public calculations of a resource
Get a public field from a resource by name
Get a public relationship by name or path
Returns all public relationships of a resource
Get a relationship by name or path
Returns all relationships of a resource
Whether or not a given module is a resource module
Determine if a field is sortable by name
Sets a loaded key or path to a key back to its original unloaded stated
Sets a list of loaded key or paths to a key back to their original unloaded stated
A list of all validations for the resource
@spec action(Ash.Resource.t(), atom(), Ash.Resource.Actions.action_type() | nil) :: Ash.Resource.Actions.action() | nil
Returns the action with the matching name and type on the resource
@spec actions(Ash.Resource.t()) :: [Ash.Resource.Actions.action()]
Returns all actions of a resource
@spec aggregate(Ash.Resource.t(), atom() | String.t()) :: Ash.Resource.Aggregate.t() | nil
Get an aggregate by name
@spec aggregates(Ash.Resource.t()) :: [Ash.Resource.Aggregate.t()]
Returns all aggregates of a resource
@spec attribute(Ash.Resource.t(), String.t() | atom()) :: Ash.Resource.Attribute.t() | nil
Get an attribute name from the resource
@spec attributes(Ash.Resource.t()) :: [Ash.Resource.Attribute.t()]
Returns all attributes of a resource
@spec authorizers(Ash.Resource.t()) :: [module()]
A list of authorizers to be used when accessing
@spec base_filter(Ash.Resource.t()) :: term()
@spec calculation(Ash.Resource.t(), atom() | String.t()) :: Ash.Resource.Calculation.t() | nil
Get a calculation by name
@spec calculations(Ash.Resource.t()) :: [Ash.Resource.Calculation.t()]
Returns all calculations of a resource
@spec changes(Ash.Resource.t()) :: [ Ash.Resource.Validation.t() | Ash.Resource.Change.t() ]
A list of all changes for the resource
@spec changes(Ash.Resource.t(), :create | :update | :destroy) :: [ Ash.Resource.Validation.t() | Ash.Resource.Change.t() ]
@spec default_actions(Ash.Resource.t()) :: [:create | :read | :update | :destroy]
Returns the configured default actions
@spec default_context(Ash.Resource.t()) :: term()
@spec define_interface_for(Ash.Resource.t()) :: atom() | nil
@spec define_interface_in_resource?(Ash.Resource.t()) :: boolean()
@spec description(Ash.Resource.t()) :: String.t() | nil
@spec embedded?(Ash.Resource.t()) :: boolean()
@spec extensions(Ash.Resource.t()) :: [module()]
@spec field(Ash.Resource.t(), String.t() | atom()) :: Ash.Resource.Attribute.t() | Ash.Resource.Aggregate.t() | Ash.Resource.Calculation.t() | Ash.Resource.Relationships.relationship() | nil
Get a field from a resource by name
@spec get_metadata(Ash.Resource.record(), atom() | [atom()]) :: term()
@spec identities(Ash.Resource.t()) :: [Ash.Resource.Identity.t()]
A list of identities for the resource
@spec identity(Ash.Resource.t(), atom()) :: Ash.Resource.Identity.t() | nil
Get an identity by name from the resource
@spec interfaces(Ash.Resource.t()) :: [Ash.Resource.Interface.t()]
@spec loaded?( nil | [Ash.Resource.record()] | Ash.Resource.record() | Ash.Page.page(), atom() | [atom()] ) :: boolean()
Returns true if the load or path to load has been loaded
@spec multitenancy_attribute(Ash.Resource.t()) :: atom() | nil
@spec multitenancy_global?(Ash.Resource.t()) :: atom() | nil
@spec multitenancy_parse_attribute(Ash.Resource.t()) :: {atom(), atom(), [any()]}
@spec multitenancy_source(Ash.Resource.t()) :: atom() | nil
@spec multitenancy_strategy(Ash.Resource.t()) :: :context | :attribute | nil
Get the multitenancy strategy for a resource
@spec multitenancy_template(Ash.Resource.t()) :: atom() | nil
@spec notifiers(Ash.Resource.t()) :: [module()]
A list of notifiers to be used when accessing
@spec preparations(Ash.Resource.t()) :: [Ash.Resource.Preparation.t()]
@spec primary_action!(Ash.Resource.t(), Ash.Resource.Actions.action_type()) :: Ash.Resource.Actions.action() | no_return()
Returns the primary action of the given type
@spec primary_action(Ash.Resource.t(), Ash.Resource.Actions.action_type()) :: Ash.Resource.Actions.action() | nil
Returns the primary action of a given type
@spec primary_key(Ash.Resource.t()) :: [atom()]
A list of field names corresponding to the primary key
@spec public_aggregate(Ash.Resource.t(), atom() | String.t()) :: Ash.Resource.Aggregate.t() | nil
Get an aggregate by name
@spec public_aggregates(Ash.Resource.t()) :: [Ash.Resource.Aggregate.t()]
Returns all public aggregates of a resource
@spec public_attribute(Ash.Resource.t(), String.t() | atom()) :: Ash.Resource.Attribute.t() | nil
Get a public attribute name from the resource
@spec public_attributes(Ash.Resource.t()) :: [Ash.Resource.Attribute.t()]
Returns all public attributes of a resource
@spec public_calculation(Ash.Resource.t(), atom() | String.t()) :: Ash.Resource.Calculation.t() | nil
Get a public calculation by name
@spec public_calculations(Ash.Resource.t()) :: [Ash.Resource.Calculation.t()]
Returns all public calculations of a resource
@spec public_field(Ash.Resource.t(), String.t() | atom()) :: Ash.Resource.Attribute.t() | Ash.Resource.Aggregate.t() | Ash.Resource.Calculation.t() | Ash.Resource.Relationships.relationship() | nil
Get a public field from a resource by name
Get a public relationship by name or path
@spec public_relationships(Ash.Resource.t()) :: [ Ash.Resource.Relationships.relationship() ]
Returns all public relationships of a resource
@spec put_metadata(Ash.Resource.record(), atom(), term()) :: Ash.Resource.record()
@spec relationship(Ash.Resource.t(), atom() | String.t() | [atom() | String.t()]) :: Ash.Resource.Relationships.relationship() | nil
Get a relationship by name or path
@spec relationships(Ash.Resource.t()) :: [Ash.Resource.Relationships.relationship()]
Returns all relationships of a resource
Whether or not a given module is a resource module
@spec selected?(Ash.Resource.record(), atom()) :: boolean()
@spec set_metadata(Ash.Resource.record(), map()) :: Ash.Resource.record()
@spec sortable?(Ash.Resource.t(), String.t() | atom(), pagination_type: Ash.Page.type(), include_private?: boolean() ) :: boolean()
Determine if a field is sortable by name
@spec unload( nil | [Ash.Resource.record()] | Ash.Resource.record() | Ash.Page.page(), atom() | [atom()] ) :: nil | [Ash.Resource.record()] | Ash.Resource.record() | Ash.Page.page()
Sets a loaded key or path to a key back to its original unloaded stated
@spec unload_many( nil | [Ash.Resource.record()] | Ash.Resource.record() | Ash.Page.page(), [atom()] | [[atom()]] ) :: nil | [Ash.Resource.record()] | Ash.Resource.record() | Ash.Page.page()
Sets a list of loaded key or paths to a key back to their original unloaded stated
@spec validations(Ash.Resource.t()) :: [Ash.Resource.Validation.t()]
A list of all validations for the resource
@spec validations(Ash.Resource.t(), :create | :update | :destroy) :: [ Ash.Resource.Validation.t() ]