ash v0.1.1 Ash.DataLayer behaviour View Source

Link to this section Summary

Link to this section Types

Link to this type

feature()

View Source
feature() :: :transact | :query_async

Link to this section Functions

Link to this function

can?(feature, resource)

View Source
can?(feature(), Ash.resource()) :: boolean()
Link to this function

create(resource, changeset)

View Source
create(Ash.resource(), Ecto.Changeset.t()) ::
  {:ok, Ash.record()} | {:error, Ash.error()}
Link to this function

filter(query, filter, resource)

View Source
filter(Ash.query(), Ash.filter(), Ash.resource()) ::
  {:ok, Ash.query()} | {:error, Ash.error()}
Link to this function

limit(query, limit, resource)

View Source
limit(Ash.query(), limit :: non_neg_integer(), Ash.resource()) ::
  {:ok, Ash.query()} | {:error, Ash.error()}
Link to this function

offset(query, offset, resource)

View Source
offset(Ash.query(), offset :: non_neg_integer(), Ash.resource()) ::
  {:ok, Ash.query()} | {:error, Ash.error()}
Link to this function

resource_to_query(resource)

View Source
resource_to_query(Ash.resource()) :: Ash.query()
Link to this function

run_query(query, central_resource)

View Source
run_query(Ash.query(), central_resource :: Ash.resource()) ::
  {:ok, [Ash.record()]} | {:error, Ash.error()}
Link to this function

sort(query, sort, resource)

View Source
sort(Ash.query(), Ash.sort(), Ash.resource()) ::
  {:ok, Ash.query()} | {:error, Ash.error()}

Link to this section Callbacks

Link to this callback

can_query_async?(arg1)

View Source
can_query_async?(Ash.resource()) :: boolean()
Link to this callback

create(arg1, changeset)

View Source
create(Ash.resource(), changeset :: Ecto.Changeset.t()) ::
  {:ok, Ash.resource()} | {:error, Ash.error()}
Link to this callback

filter(arg1, arg2, resource)

View Source
filter(Ash.query(), Ash.filter(), resource :: Ash.resource()) ::
  {:ok, Ash.query()} | {:error, Ash.error()}
Link to this callback

limit(arg1, limit, resource)

View Source
limit(Ash.query(), limit :: non_neg_integer(), resource :: Ash.resource()) ::
  {:ok, Ash.query()} | {:error, Ash.error()}
Link to this callback

offset(arg1, offset, resource)

View Source
offset(Ash.query(), offset :: non_neg_integer(), resource :: Ash.resource()) ::
  {:ok, Ash.query()} | {:error, Ash.error()}
Link to this callback

resource_to_query(arg1)

View Source
resource_to_query(Ash.resource()) :: Ash.query()
Link to this callback

run_query(arg1, arg2)

View Source
run_query(Ash.query(), Ash.resource()) ::
  {:ok, [Ash.resource()]} | {:error, Ash.error()}
Link to this callback

sort(arg1, arg2, resource)

View Source
sort(Ash.query(), Ash.sort(), resource :: Ash.resource()) ::
  {:ok, Ash.query()} | {:error, Ash.error()}