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 blank
table - the table (or view) name within that connection; must not be blank
columns - the declared output columns; must not be null
references - 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 Details

    • ConnectionTableSourceConfig

      public ConnectionTableSourceConfig(String connection, String table, List<ColumnSpec> columns, List<ColumnReference> references)
      Creates an instance of a ConnectionTableSourceConfig record class.
      Parameters:
      connection - the value for the connection record component
      table - the value for the table record component
      columns - the value for the columns record component
      references - the value for the references record component
    • ConnectionTableSourceConfig

      public ConnectionTableSourceConfig(String connection, String table, List<ColumnSpec> columns)
      Creates a config with no declared references.
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • connection

      public String connection()
      Returns the value of the connection record component.
      Returns:
      the value of the connection record component
    • table

      public String table()
      Returns the value of the table record component.
      Returns:
      the value of the table record component
    • columns

      public List<ColumnSpec> columns()
      Returns the value of the columns record component.
      Returns:
      the value of the columns record component
    • references

      public List<ColumnReference> references()
      Returns the value of the references record component.
      Returns:
      the value of the references record component