Package dev.frostlake.metastore.model
Class TableColumn
java.lang.Object
dev.frostlake.metastore.model.TableColumn
- All Implemented Interfaces:
Taggable
-
Constructor Summary
ConstructorsConstructorDescriptionTableColumn(String name, DataType dataType, boolean nullable, Object defaultValue, boolean primaryKey, boolean unique, boolean autoIncrement) TableColumn(String name, DataType dataType, boolean nullable, Object defaultValue, boolean primaryKey, boolean unique, boolean autoIncrement, long identityStart, long identityIncrement) -
Method Summary
Modifier and TypeMethodDescriptionlonglonggetName()The projection policy attached to this column, fully qualified, or null.getRely()The NUMBER this column's values spell when a derived relation projects a bare string literal as it —(SELECT '12.5' AS t, …)— or projects another such column; null for every other column.getTagValue(String tagName) The value of the named tag on this object, ornullif not set.All tag associations on this object (tag name -> value).booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanWhethergetDataType()is this column's STATICALLY KNOWN type.booleanisUnique()A copy of this column that accepts NULL — the null-extended side of an outer join, where the shared catalog instance must keep its own NOT NULL.voidsetCollation(String collation) voidsetComment(String comment) voidsetDefaultValue(Object defaultValue) voidsetMaskingPolicyName(String name) voidsetNullable(boolean nullable) voidsetOnDelete(String onDelete) voidsetOnUpdate(String onUpdate) voidvoidsetReferencedColumn(String referencedColumn) voidsetReferencedTable(String referencedTable) voidvoidsetSpelledNumber(DataType spelledNumber) voidsetStaticallyTyped(boolean staticallyTyped) voidAssociate (or overwrite) a tag value on this object;tagNameis the canonical upper-cased tag name.voidsetValueRange(ValueRange valueRange) A copy of this column marked hidden fromSELECT *— used for the right-side duplicate of a USING / NATURAL join column in a merged join view (the shared catalog instance stays untouched).voidRemove a tag association from this object (no-op if absent).
-
Constructor Details
-
TableColumn
-
TableColumn
-
-
Method Details
-
getName
-
isHiddenFromStar
public boolean isHiddenFromStar() -
isStaticallyTyped
public boolean isStaticallyTyped()WhethergetDataType()is this column's STATICALLY KNOWN type. Set only on a derived relation's columns, where the inner projection's inferred type is carried out to the enclosing query so a type-based rule fires through a subquery, CTE or view exactly as it does over the base table. False on catalog columns, whose table is trusted by catalog identity. -
setStaticallyTyped
public void setStaticallyTyped(boolean staticallyTyped) -
getValueRange
-
setValueRange
-
getSpelledNumber
The NUMBER this column's values spell when a derived relation projects a bare string literal as it —(SELECT '12.5' AS t, …)— or projects another such column; null for every other column. A conditional folds the column by it as it folds the literal itself: live typesCOALESCE(t, n)over that derived table exactly asCOALESCE('12.5', n).- Returns:
- the literal's measured NUMBER, or null
-
setSpelledNumber
-
starHiddenCopy
A copy of this column marked hidden fromSELECT *— used for the right-side duplicate of a USING / NATURAL join column in a merged join view (the shared catalog instance stays untouched). -
nullableCopy
A copy of this column that accepts NULL — the null-extended side of an outer join, where the shared catalog instance must keep its own NOT NULL. -
setTag
Description copied from interface:TaggableAssociate (or overwrite) a tag value on this object;tagNameis the canonical upper-cased tag name. -
unsetTag
Description copied from interface:TaggableRemove a tag association from this object (no-op if absent). -
getTagValue
Description copied from interface:TaggableThe value of the named tag on this object, ornullif not set.- Specified by:
getTagValuein interfaceTaggable
-
getTagValues
Description copied from interface:TaggableAll tag associations on this object (tag name -> value). Named getTagValues to avoid clashing with Schema.getTags().- Specified by:
getTagValuesin interfaceTaggable
-
getDataType
-
isNullable
public boolean isNullable() -
getDefaultValue
-
isPrimaryKey
public boolean isPrimaryKey() -
isUnique
public boolean isUnique() -
isAutoIncrement
public boolean isAutoIncrement() -
getIdentityStart
public long getIdentityStart() -
getIdentityIncrement
public long getIdentityIncrement() -
getComment
-
setComment
-
setNullable
public void setNullable(boolean nullable) -
setDefaultValue
-
getCollation
-
setCollation
-
getReferencedTable
-
setReferencedTable
-
getReferencedColumn
-
setReferencedColumn
-
getOnDelete
-
setOnDelete
-
getOnUpdate
-
setOnUpdate
-
hasForeignKey
public boolean hasForeignKey() -
getRely
-
setRely
-
getProjectionPolicyName
The projection policy attached to this column, fully qualified, or null. -
setProjectionPolicyName
-
hasProjectionPolicy
public boolean hasProjectionPolicy() -
getMaskingPolicyName
-
setMaskingPolicyName
-
hasMaskingPolicy
public boolean hasMaskingPolicy()
-