Foundry.Manifest.Calculations.LibraryEnabled (foundry v0.2.0)

Copy Markdown

Module-based calculation for Foundry.Manifest. Returns true if the given library atom is present in conditional_libraries.

Used in place of SQL fragment/1 expressions, which are not valid with Ash.DataLayer.Simple (evaluated in Elixir, not Postgres).

Usage

calculate :ash_money_enabled, :boolean,
          Foundry.Manifest.Calculations.LibraryEnabled,
          arguments: [library: :ash_money]

Summary

Functions

describe(opts)

Callback implementation for Ash.Resource.Calculation.describe/1.

has_calculate?()

has_expression?()

Callback implementation for Ash.Resource.Calculation.has_expression?/0.

init(opts)

Callback implementation for Ash.Resource.Calculation.init/1.

load(query, opts, context)

Callback implementation for Ash.Resource.Calculation.load/3.

strict_loads?()

Callback implementation for Ash.Resource.Calculation.strict_loads?/0.