Ash.OptionsHelpers (ash v3.5.20)

View Source

Helpers for working with nimble options

Summary

Functions

Used to configure Spark to know that the type referenced is an Ash.Resource also using Spark.

Specifies Ash types that can be allowed when declaring a type for an attribute, calculation, aggregate, etc.

Defines the calculation type used in DSL schema definitions, allowing either a calculation module/function or an expr(...) expression.

Used for marking an option as hidden so it doesn't show up as an option with Spark.

Functions

ash_resource()

@spec ash_resource() :: {:spark, Ash.Resource}

Used to configure Spark to know that the type referenced is an Ash.Resource also using Spark.

ash_type()

@spec ash_type() ::
  {:spark_type, Ash.Type, :builtins, [{String.t(), String.t(), String.t()}]}

Specifies Ash types that can be allowed when declaring a type for an attribute, calculation, aggregate, etc.

calculation_type()

@spec calculation_type() :: Spark.Options.type()

Defines the calculation type used in DSL schema definitions, allowing either a calculation module/function or an expr(...) expression.

hide_all_except(options, keys)

@spec hide_all_except(Keyword.t(), [atom()]) :: Keyword.t()

Used for marking an option as hidden so it doesn't show up as an option with Spark.