AshBackendDrivenOptimisticUi.Resource.Transformers.DeriveSets (AshBackendDrivenOptimisticUi v0.1.0)

Copy Markdown View Source

Reads each optimistic action and prepends a derived set for every readable change: atomic_update(attr, expr), and set_attribute(attr, v) with a literal or arg(...) value. A change module that implements AshBackendDrivenOptimisticUi.Change describes its own sets. Other change modules and changes guarded by where are skipped, so a rule never claims more than the action shows. A create also gets set attr, expr(arg(attr)) for every attribute it accepts: the new record is built from the input. An update gets the same set for each accepted attribute, inside where expr(has_arg(attr)): an update changes a field only when the input carries it. A declared set for the same attribute wins, and so does a readable change over an accepted one. A destroy rule that declares no effect gets remove().

Summary

Functions

after_compile?()

Callback implementation for Spark.Dsl.Transformer.after_compile?/0.

before?(_)

Callback implementation for Spark.Dsl.Transformer.before?/1.