Package dev.frostlake.storage
Class ResultSetColumn
java.lang.Object
dev.frostlake.storage.ResultSetColumn
-
Constructor Summary
ConstructorsConstructorDescriptionResultSetColumn(String name, DataType dataType) ResultSetColumn(String name, DataType dataType, String tableName) ResultSetColumn(String name, DataType dataType, String tableName, DataType staticType) ResultSetColumn(String name, DataType dataType, String tableName, DataType staticType, boolean nullable) ResultSetColumn(String name, DataType dataType, String tableName, DataType staticType, boolean nullable, boolean nullabilityKnown) ResultSetColumn(String name, DataType dataType, String tableName, DataType staticType, boolean nullable, boolean nullabilityKnown, ValueRange valueRange) ResultSetColumn(String name, DataType dataType, String tableName, DataType staticType, boolean nullable, boolean nullabilityKnown, ValueRange valueRange, DataType spelledNumber) -
Method Summary
Modifier and TypeMethodDescriptionThe collation this column's values compare under, or null when it carries none.getName()The NUMBER this column's values spell, or null — see TableColumn#getSpelledNumber.The type this column is statically KNOWN to produce, or null when a projection could not tell — in which casegetDataType()is a placeholder that no type rule may read.The interval this column's values lie in, or null when none is known.booleanWhetherisNullable()was determined rather than defaulted.booleanWhether this column accepts NULL.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.
-
Constructor Details
-
ResultSetColumn
-
ResultSetColumn
-
ResultSetColumn
-
ResultSetColumn
-
ResultSetColumn
-
ResultSetColumn
public ResultSetColumn(String name, DataType dataType, String tableName, DataType staticType, boolean nullable, boolean nullabilityKnown, ValueRange valueRange) -
ResultSetColumn
-
-
Method Details
-
withCollation
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
The collation this column's values compare under, or null when it carries none.- Returns:
- the specification, lower-cased
-
getValueRange
The interval this column's values lie in, or null when none is known. -
getSpelledNumber
The NUMBER this column's values spell, or null — see TableColumn#getSpelledNumber. -
getName
-
getDataType
-
getTableName
-
getStaticType
The type this column is statically KNOWN to produce, or null when a projection could not tell — in which casegetDataType()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()WhetherisNullable()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.
-