Record Class ConnectionTableSourceConfig
java.lang.Object
java.lang.Record
com.darkcollective.relix.lang.ast.source.ConnectionTableSourceConfig
- Record Components:
connection- the referenced connection name; must not be blanktable- the table (or view) name within that connection; must not be blankcolumns- the declared output columns; must not be nullreferences- the declared column references; may be empty
- All Implemented Interfaces:
SourceConfig
public record ConnectionTableSourceConfig(String connection, String table, List<ColumnSpec> columns, List<ColumnReference> references)
extends Record
implements SourceConfig
Configuration for a source bound to a table within a named
connection, e.g.
source Orders from sales { table: "orders", schema: { … } }.
Unlike DatabaseSourceConfig (which embeds its own JDBC URL), this
config references a connection by name; the JDBC coordinates come from the
matching connection declaration.
In phase 1 a schema must be declared; later phases will introspect
it from the database when omitted (the "hybrid" schema model).
An optional references: block declares foreign-key style
relationships from this source's columns to other relations.
-
Constructor Summary
ConstructorsConstructorDescriptionConnectionTableSourceConfig(String connection, String table, List<ColumnSpec> columns) Creates a config with no declared references.ConnectionTableSourceConfig(String connection, String table, List<ColumnSpec> columns, List<ColumnReference> references) Creates an instance of aConnectionTableSourceConfigrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncolumns()Returns the value of thecolumnsrecord component.Returns the value of theconnectionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thereferencesrecord component.table()Returns the value of thetablerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ConnectionTableSourceConfig
public ConnectionTableSourceConfig(String connection, String table, List<ColumnSpec> columns, List<ColumnReference> references) Creates an instance of aConnectionTableSourceConfigrecord class.- Parameters:
connection- the value for theconnectionrecord componenttable- the value for thetablerecord componentcolumns- the value for thecolumnsrecord componentreferences- the value for thereferencesrecord component
-
ConnectionTableSourceConfig
Creates a config with no declared references.
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
connection
Returns the value of theconnectionrecord component.- Returns:
- the value of the
connectionrecord component
-
table
Returns the value of thetablerecord component.- Returns:
- the value of the
tablerecord component
-
columns
Returns the value of thecolumnsrecord component.- Returns:
- the value of the
columnsrecord component
-
references
Returns the value of thereferencesrecord component.- Returns:
- the value of the
referencesrecord component
-