Record Class SystemRelationSymbol

java.lang.Object
java.lang.Record
com.darkcollective.relix.symbol.relation.SystemRelationSymbol
Record Components:
namespace - always "relix"; must not be blank
declaredName - the catalog name (e.g. "relations"); must not be blank
provenance - always Provenance.BUILTIN; must not be null
shadowPolicy - ShadowPolicy.FORBIDDEN for fixed-extent catalogs; ShadowPolicy.PERMITTED for placeholder-then-fill; must not be null
schema - the structural description of the relation; must not be null
rows - the catalog row data; must not be null (may be empty for placeholders awaiting their post-inference fill)
All Implemented Interfaces:
RelationSymbol, Symbol

public record SystemRelationSymbol(String namespace, String declaredName, Provenance provenance, ShadowPolicy shadowPolicy, Schema schema, List<Map<String,Operand>> rows) extends Record implements RelationSymbol
A read-only system catalog relation in the reserved relix.* namespace.

System catalog relations represent the engine's self-description (the information_schema analogue). They are always Provenance.BUILTIN; unlike InlineRelationSymbol — which stores user-declared inline data — this type signals that the rows are engine-computed and the relation is structurally read-only. Callers pattern-matching on RelationSymbol can distinguish catalog relations from user-declared inline data by type alone.

Catalog relations are registered by CatalogBuilder in the relix namespace. Those whose extents depend on inferred view schemas (relix.columns, relix.plan) use the placeholder-then-fill pattern: they are registered with an empty rows list before schema inference and re-registered with the real extent after; the placeholder registration uses ShadowPolicy.PERMITTED to allow the overwrite.

Both the outer row list and each inner map are defensive-copied on construction.

  • Constructor Details

    • SystemRelationSymbol

      public SystemRelationSymbol(String namespace, String declaredName, Provenance provenance, ShadowPolicy shadowPolicy, Schema schema, List<Map<String,Operand>> rows)
      Creates an instance of a SystemRelationSymbol record class.
      Parameters:
      namespace - the value for the namespace record component
      declaredName - the value for the declaredName record component
      provenance - the value for the provenance record component
      shadowPolicy - the value for the shadowPolicy record component
      schema - the value for the schema record component
      rows - the value for the rows record component
  • 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.
    • namespace

      public String namespace()
      Returns the value of the namespace record component.
      Specified by:
      namespace in interface Symbol
      Returns:
      the value of the namespace record component
    • declaredName

      public String declaredName()
      Returns the value of the declaredName record component.
      Specified by:
      declaredName in interface Symbol
      Returns:
      the value of the declaredName record component
    • provenance

      public Provenance provenance()
      Returns the value of the provenance record component.
      Specified by:
      provenance in interface Symbol
      Returns:
      the value of the provenance record component
    • shadowPolicy

      public ShadowPolicy shadowPolicy()
      Returns the value of the shadowPolicy record component.
      Specified by:
      shadowPolicy in interface Symbol
      Returns:
      the value of the shadowPolicy record component
    • schema

      public Schema schema()
      Returns the value of the schema record component.
      Specified by:
      schema in interface RelationSymbol
      Returns:
      the value of the schema record component
    • rows

      public List<Map<String,Operand>> rows()
      Returns the value of the rows record component.
      Returns:
      the value of the rows record component