Ash.Info.Manifest.Generator.CapabilitiesBuilder (ash v3.25.0)

Copy Markdown View Source

Builds the top-level %FilterCapabilities{} and %SortCapabilities{} for a manifest by enumerating Ash's builtin operators/functions and the app's registered custom expressions.

Summary

Functions

Build the global %FilterCapabilities{} and %SortCapabilities{} for a manifest.

Functions

build(opts \\ [])

Build the global %FilterCapabilities{} and %SortCapabilities{} for a manifest.

Options

  • :resources_by_data_layer - Map of %{data_layer_module => [resources]} whose functions/1 callback contributes additional predicate functions to the catalog. The first resource per data layer is used as the representative when invoking functions/1 — required because some data-layer implementations (e.g. AshPostgres.DataLayer) read configuration off the resource and crash with nil. Each contributed %Function{} is tagged with data_layer_module so consumers can intersect against a resource's data layer.

Without :resources_by_data_layer, the catalog is the Ash builtins plus the app's registered custom expressions.