Class ResultSetColumn

java.lang.Object
dev.frostlake.storage.ResultSetColumn

public class ResultSetColumn extends Object
  • Constructor Details

  • Method Details

    • withCollation

      public ResultSetColumn withCollation(String spec)
      This column carrying a collation — what a projection stamps when the expression it projects has one, so the derived relation, view or table built from this result set collates the column too.
      Parameters:
      spec - the collation specification, lower-cased
      Returns:
      a copy of this column carrying it
    • getCollation

      public String getCollation()
      The collation this column's values compare under, or null when it carries none.
      Returns:
      the specification, lower-cased
    • getValueRange

      public ValueRange getValueRange()
      The interval this column's values lie in, or null when none is known.
    • getSpelledNumber

      public DataType getSpelledNumber()
      The NUMBER this column's values spell, or null — see TableColumn#getSpelledNumber.
    • getName

      public String getName()
    • getDataType

      public DataType getDataType()
    • getTableName

      public String getTableName()
    • getStaticType

      public DataType getStaticType()
      The type this column is statically KNOWN to produce, or null when a projection could not tell — in which case getDataType() is a placeholder that no type rule may read. A derived table built from this result set carries the same distinction into the enclosing query.
    • isNullable

      public boolean isNullable()
      Whether this column accepts NULL. Only a projected COLUMN REFERENCE can answer false, and only when its source column is NOT NULL — an expression over that same column, a cast of it, an aggregate, a literal or either side of a set operation all accept NULL (live-verified).
    • isNullabilityKnown

      public boolean isNullabilityKnown()
      Whether isNullable() was determined rather than defaulted. Only a projected COLUMN REFERENCE determines it — an expression, an aggregate and a literal all leave it unknown, which is exactly the distinction the JDBC driver reports and the catalog surfaces do not.