Expand description
Reactive transform primitives for derived records
This module provides the .transform() and .transform_join() API for declaring
reactive derivations from one or more input records to an output record.
§Transform Archetypes
- Map (1:1, stateless): Transform each input value to zero-or-one output value
- Accumulate (N:1, stateful): Aggregate a stream of values with persistent state
- Join (M×N:1, stateful, multi-input): Combine values from multiple input records
All three are handled by a unified API surface:
- Single-input:
.transform()withTransformBuilder - Multi-input:
.transform_join()withJoinBuilder
§Design Principles
- Transforms are owned by AimDB — visible in the dependency graph
- Transforms are mutually exclusive with
.source()on the same record - Multiple
.tap()observers can still be attached to a transform’s output - Input subscriptions use existing
Consumer<T, R>/BufferReader<T>API - Build-time validation catches missing input keys and cyclic dependencies
Structs§
- Join
Builder - Type-erased input descriptor for joins.
- Join
Pipeline - Completed multi-input join pipeline, ready to be stored in
TypedRecord. - Join
State Builder - Intermediate builder for setting the join trigger handler.
- Stateful
Transform Builder - Intermediate builder for stateful single-input transforms.
- Transform
Builder - Configures a single-input transform pipeline.
- Transform
Pipeline - Completed single-input transform pipeline, ready to be stored in
TypedRecord.
Enums§
- Join
Trigger - Tells the join handler which input produced a value.