#
View Source Ash.Resource (ash v2.4.22)

A resource is a static definition of an entity in your system.

Resource DSL documentation: `Ash.Resource.Dsl`

# Link to this section Summary

## Types

record()
t()

## Functions

default_extensions()
get_metadata(record, key_or_path)
loaded?(records, path)

Returns true if the load or path to load has been loaded

put_metadata(record, key, term)
selected?(record, field)
set_metadata(record, map)
unload(page, path)

Sets a loaded key or path to a key back to its original unloaded stated

unload_many(data, paths)

Sets a list of loaded key or paths to a key back to their original unloaded stated

# Link to this section Types

Link to this type

# record()

View Source

    @type record() :: struct()

Link to this type

# t()

View Source

    @type t() :: module()

# Link to this section Functions

Link to this function

# default_extensions()

View Source
Link to this function

# get_metadata(record, key_or_path)

View Source

    @spec get_metadata(record(), atom() | [atom()]) :: term()

Link to this function

# loaded?(records, path)

View Source

    @spec loaded?(
      nil | [record()] | record() | Ash.Page.page(),
      atom() | [atom()]
    ) :: boolean()

Returns true if the load or path to load has been loaded

Link to this function

# put_metadata(record, key, term)

View Source

    @spec put_metadata(record(), atom(), term()) :: record()

Link to this function

# selected?(record, field)

View Source

    @spec selected?(record(), atom()) :: boolean()

Link to this function

# set_metadata(record, map)

View Source

    @spec set_metadata(record(), map()) :: record()

Link to this function

# unload(page, path)

View Source

    @spec unload(
      nil | [record()] | record() | Ash.Page.page(),
      atom() | [atom()]
    ) :: nil | [record()] | record() | Ash.Page.page()

Sets a loaded key or path to a key back to its original unloaded stated

Link to this function

# unload_many(data, paths)

View Source

    @spec unload_many(
      nil | [record()] | record() | Ash.Page.page(),
      [atom()] | [[atom()]]
    ) :: nil | [record()] | record() | Ash.Page.page()

Sets a list of loaded key or paths to a key back to their original unloaded stated