View Source Backpex.Adapters.Ash (Backpex v0.8.1)

The Backpex.Adapter to connect your Backpex.LiveResource to an Ash.Resource.

adapter_config

  • :resource (atom/0) - Required. The Ash.Resource that will be used to perform CRUD operations.

Work in progress

The Backpex.Adapters.Ash is currently not usable! It can barely list and show items. We will work on this as we continue to implement the Backpex.Adapter pattern throughout the codebase.

Summary

Functions

Applies a change to a given item.

Returns the number of items matching the given criteria.

Deletes multiple items.

Gets a database record with the given primary key value.

Gets a database record with the given primary key value.

Inserts given item.

Returns a list of items by given criteria.

Updates given item.

Updates given items.

Functions

Link to this function

change(item, attrs, fields, assigns, config, opts)

View Source

Applies a change to a given item.

Link to this function

count(fields, assigns, config, criteria \\ [])

View Source

Returns the number of items matching the given criteria.

Link to this function

delete_all(items, config)

View Source

Deletes multiple items.

Link to this function

get(primary_value, assigns, live_resource)

View Source

Gets a database record with the given primary key value.

Returns nil if no result was found.

Link to this function

get!(primary_value, assigns, live_resource)

View Source

Gets a database record with the given primary key value.

Raises an error if no record was found.

Inserts given item.

Link to this function

list(fields, assigns, config, criteria \\ [])

View Source

Returns a list of items by given criteria.

Updates given item.

Link to this function

update_all(items, updates, config)

View Source

Updates given items.

Link to this function

validate_config!(config)

View Source