Backpex.Adapters.Ash (Backpex v0.12.0)

View Source

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

Returns the number of items matching the given criteria.

Deletes multiple items.

Gets a database record with the given primary key value.

Inserts given item.

Returns a list of items by given criteria.

Updates given item.

Functions

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

Applies a change to a given item.

count(criteria, assigns, live_resource)

Returns the number of items matching the given criteria.

delete_all(items, live_resource)

Deletes multiple items.

get(primary_value, assigns, live_resource)

Gets a database record with the given primary key value.

Returns nil if no result was found.

insert(item, live_resource)

Inserts given item.

list(criteria, assigns, live_resource)

Returns a list of items by given criteria.

update(item, live_resource)

Updates given item.

update_all(items, updates, live_resource)

Updates given items.

validate_config!(config)