Record Class RowSchema

java.lang.Object
java.lang.Record
com.inductiveautomation.historian.gateway.api.query.pipeline.RowSchema
Record Components:
columnNames - ordered column names
columnTypes - ordered column types (parallel to columnNames)
firstColumnIsTimestamp - whether column 0 is a timestamp column
supportsQuality - whether this dataset carries a quality code per cell; unrelated to whether column 0 is a timestamp
aggregateColumnTypes - the type of each aggregate's cells where one value column carries several aggregates (the Calculation layout), so a pivot can type a column per aggregate; empty otherwise

public record RowSchema(List<String> columnNames, List<ColumnType> columnTypes, boolean firstColumnIsTimestamp, boolean supportsQuality, Map<AggregateId, ColumnType> aggregateColumnTypes) extends Record
Describes the schema of rows emitted by a QueryPipeline.

Emitted exactly once via RowSink.onSchema(RowSchema) before any rows. Columns are positional; per-cell qualities on Row.Wide are indexed identically.

  • Constructor Details

    • RowSchema

      public RowSchema(List<String> columnNames, List<ColumnType> columnTypes, boolean firstColumnIsTimestamp, boolean supportsQuality, Map<AggregateId, ColumnType> aggregateColumnTypes)
      Creates an instance of a RowSchema record class.
      Parameters:
      columnNames - the value for the columnNames record component
      columnTypes - the value for the columnTypes record component
      firstColumnIsTimestamp - the value for the firstColumnIsTimestamp record component
      supportsQuality - the value for the supportsQuality record component
      aggregateColumnTypes - the value for the aggregateColumnTypes record component
    • RowSchema

      public RowSchema(List<String> columnNames, List<ColumnType> columnTypes, boolean firstColumnIsTimestamp, boolean supportsQuality)
      A schema with no per-aggregate column types.
  • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      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.
    • columnNames

      public List<String> columnNames()
      Returns the value of the columnNames record component.
      Returns:
      the value of the columnNames record component
    • columnTypes

      public List<ColumnType> columnTypes()
      Returns the value of the columnTypes record component.
      Returns:
      the value of the columnTypes record component
    • firstColumnIsTimestamp

      public boolean firstColumnIsTimestamp()
      Returns the value of the firstColumnIsTimestamp record component.
      Returns:
      the value of the firstColumnIsTimestamp record component
    • supportsQuality

      public boolean supportsQuality()
      Returns the value of the supportsQuality record component.
      Returns:
      the value of the supportsQuality record component
    • aggregateColumnTypes

      public Map<AggregateId, ColumnType> aggregateColumnTypes()
      Returns the value of the aggregateColumnTypes record component.
      Returns:
      the value of the aggregateColumnTypes record component