Class GeneratorDataSourceConnector
java.lang.Object
com.darkcollective.relix.processor.generator.GeneratorDataSourceConnector
- All Implemented Interfaces:
DataSourceConnector,AutoCloseable
A
DataSourceConnector that serves generator relations — leaves whose rows
are produced by engine code.
For a relation declared as source R from generator { name: "Range", … },
this resolves the relation's GeneratorSourceConfig (from
SemanticModel.sources()), looks up the named Generator in the
GeneratorRegistry, and returns its lazy Stream<Row>. Argument
validation is the generator's responsibility and surfaces here at open time.
-
Constructor Summary
ConstructorsConstructorDescriptionGeneratorDataSourceConnector(SemanticModel model, GeneratorRegistry registry) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.darkcollective.relix.processor.internal.DataSourceConnector
close, openQuery, openQuery
-
Constructor Details
-
GeneratorDataSourceConnector
- Parameters:
model- the semantic model whosesourcesdeclare each generator relationregistry- the catalogue of built-in generators
-
-
Method Details
-
open
Description copied from interface:DataSourceConnectorOpens a stream of rows for the named relation.- Specified by:
openin interfaceDataSourceConnector- Parameters:
relationName- the canonical (lower-cased) relation nameschema- the expected schema; may be used to map source columns to the correct positions and types- Returns:
- a stream of rows; the caller is responsible for closing it
-