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

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

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

Applies a change to a given item.

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

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.

get!(primary_value, assigns, live_resource)

Gets a database record with the given primary key value.

Raises an error if no record was found.

insert(item, config)

Inserts given item.

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

Returns a list of items by given criteria.

update(item, config)

Updates given item.

update_all(items, updates, config)

Updates given items.

validate_config!(config)