Package com.darkcollective.relix.processor.generator
package com.darkcollective.relix.processor.generator
Generator relations — leaf relations whose rows are produced by engine code
rather than read from a file or database.
A Generator owns its
schema and lazily produces its rows;
GeneratorRegistry indexes the
built-ins (RangeGenerator,
NaturalsGenerator,
PrimesGenerator)
and doubles as the GeneratorCatalog seam
so the same definitions supply schemas to semantic analysis and rows to execution
(served by GeneratorDataSourceConnector).
A generator also answers the analyses that need to reason about it as a leaf:
GeneratorBoundednessSource (is it infinite?),
GeneratorDistinctnessSource (is it duplicate-free?) and
GeneratorMonotonicitySource (does it ascend on a column, so an upper-bound
selection can stop production?).
-
ClassDescriptionA code-backed leaf relation — its rows are produced by engine code rather than read from a file or database.A
BoundednessSourcebacked by a model's sources and the generator registry: a leaf relation isBoundedness.UNBOUNDEDiff it is a generator source whose generator declaresGenerator.unbounded(); every other leaf (CSV/JSON/JDBC/inline/finite generator) isBoundedness.BOUNDED.ADataSourceConnectorthat serves generator relations — leaves whose rows are produced by engine code.ADistinctnessSourcebacked by a model's sources and the generator registry: a leaf relation is duplicate-free iff it is a generator source whose generator declaresGenerator.duplicateFree()(e.g.AMonotoneGeneratorSourcebacked by a model's sources and the generator registry: a leaf relation reports an ascending value column iff it is a generator source whose generator declares one viaGenerator.ascendingColumn()(the unboundedNaturals/Primes).Naturals— the canonical infinite leaf: the natural numbers ℕ₀0, 1, 2, 3, …in a single columnn:NUMBER.Primes— the conceptual driver of the generator story: the prime numbers2, 3, 5, 7, 11, …in a single columnn:NUMBER, in ascending order.Range(lo, hi[, step])— a finite arithmetic series, thegenerate_seriesworkhorse.