Expand description
Persistent transformation triggers.
A trigger is a stored LiNo substitution query that the CLI replays after
every write, turning a one-off transformation into a standing rule. This is
the Rust port of
Foundation.Data.Doublets.Cli.PersistentTransformationDecorator, and it
keeps the same on-disk shape so the two implementations can read each
other’s trigger databases:
(Always ((Condition <condition text>) (Substitution <substitution text>)))
(Once ((Condition <condition text>) (Substitution <substitution text>)))Condition, Substitution, Type, Trigger, Once and Always are
named points; the condition and substitution texts are named points too,
whose names carry the INTERNAL_NAME_PREFIX so they cannot collide with
user-visible names.
§Where the triggers live
TriggerStore decides that: TriggerStore::Sidecar keeps them in a
companion database (<db>.triggers.links by default, see
make_triggers_database_filename), while TriggerStore::Embedded
stores them in the decorated database itself — the --embed-triggers mode.
§Extension points
The decorator is generic over any NamedTypeLinks, so it composes with
the plain store, the transactions layer and the version-control layer
alike, and an embedder can stack it wherever it wants in its own chain. The
parsing (
PersistentTransformationQuery), the stored form
(PersistentTransformation) and the store selection (TriggerStore)
are all public so custom CLIs can inspect, migrate or generate triggers
without going through this decorator at all.
Structs§
- Persistent
Transformation - A trigger as it is stored in a links database.
- Persistent
Transformation Decorator - Replays stored triggers after every write that goes through it.
- Persistent
Transformation Query - A trigger query split into its condition and substitution halves.
Enums§
- Persistent
Transformation Kind - How long a stored trigger lives.
- Trigger
Store - Where a
PersistentTransformationDecoratorkeeps its triggers.
Constants§
- INTERNAL_
NAME_ PREFIX - Prefix of the internal names used for stored condition and substitution
texts. It keeps trigger bookkeeping distinguishable from user names even in
TriggerStore::Embeddedmode, where both share one namespace.
Functions§
- make_
triggers_ database_ filename - Conventional sidecar filename for the trigger store:
<db>.triggers.links.