Class TableColumn

java.lang.Object
dev.frostlake.metastore.model.TableColumn
All Implemented Interfaces:
Taggable

public class TableColumn extends Object implements Taggable
  • Constructor Details

    • TableColumn

      public TableColumn(String name, DataType dataType, boolean nullable, Object defaultValue, boolean primaryKey, boolean unique, boolean autoIncrement)
    • TableColumn

      public TableColumn(String name, DataType dataType, boolean nullable, Object defaultValue, boolean primaryKey, boolean unique, boolean autoIncrement, long identityStart, long identityIncrement)
  • Method Details

    • getName

      public String getName()
    • isHiddenFromStar

      public boolean isHiddenFromStar()
    • isStaticallyTyped

      public boolean isStaticallyTyped()
      Whether getDataType() 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

      public ValueRange getValueRange()
    • setValueRange

      public void setValueRange(ValueRange valueRange)
    • getSpelledNumber

      public DataType 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 types COALESCE(t, n) over that derived table exactly as COALESCE('12.5', n).
      Returns:
      the literal's measured NUMBER, or null
    • setSpelledNumber

      public void setSpelledNumber(DataType spelledNumber)
    • starHiddenCopy

      public TableColumn starHiddenCopy()
      A copy of this column marked hidden from SELECT * — used for the right-side duplicate of a USING / NATURAL join column in a merged join view (the shared catalog instance stays untouched).
    • nullableCopy

      public TableColumn 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

      public void setTag(String tagName, String value)
      Description copied from interface: Taggable
      Associate (or overwrite) a tag value on this object; tagName is the canonical upper-cased tag name.
      Specified by:
      setTag in interface Taggable
    • unsetTag

      public void unsetTag(String tagName)
      Description copied from interface: Taggable
      Remove a tag association from this object (no-op if absent).
      Specified by:
      unsetTag in interface Taggable
    • getTagValue

      public String getTagValue(String tagName)
      Description copied from interface: Taggable
      The value of the named tag on this object, or null if not set.
      Specified by:
      getTagValue in interface Taggable
    • getTagValues

      public Map<String,String> getTagValues()
      Description copied from interface: Taggable
      All tag associations on this object (tag name -> value). Named getTagValues to avoid clashing with Schema.getTags().
      Specified by:
      getTagValues in interface Taggable
    • getDataType

      public DataType getDataType()
    • isNullable

      public boolean isNullable()
    • getDefaultValue

      public Object getDefaultValue()
    • isPrimaryKey

      public boolean isPrimaryKey()
    • isUnique

      public boolean isUnique()
    • isAutoIncrement

      public boolean isAutoIncrement()
    • getIdentityStart

      public long getIdentityStart()
    • getIdentityIncrement

      public long getIdentityIncrement()
    • getComment

      public String getComment()
    • setComment

      public void setComment(String comment)
    • setNullable

      public void setNullable(boolean nullable)
    • setDefaultValue

      public void setDefaultValue(Object defaultValue)
    • getCollation

      public String getCollation()
    • setCollation

      public void setCollation(String collation)
    • getReferencedTable

      public String getReferencedTable()
    • setReferencedTable

      public void setReferencedTable(String referencedTable)
    • getReferencedColumn

      public String getReferencedColumn()
    • setReferencedColumn

      public void setReferencedColumn(String referencedColumn)
    • getOnDelete

      public String getOnDelete()
    • setOnDelete

      public void setOnDelete(String onDelete)
    • getOnUpdate

      public String getOnUpdate()
    • setOnUpdate

      public void setOnUpdate(String onUpdate)
    • hasForeignKey

      public boolean hasForeignKey()
    • getRely

      public Boolean getRely()
    • setRely

      public void setRely(Boolean rely)
    • getProjectionPolicyName

      public String getProjectionPolicyName()
      The projection policy attached to this column, fully qualified, or null.
    • setProjectionPolicyName

      public void setProjectionPolicyName(String name)
    • hasProjectionPolicy

      public boolean hasProjectionPolicy()
    • getMaskingPolicyName

      public String getMaskingPolicyName()
    • setMaskingPolicyName

      public void setMaskingPolicyName(String name)
    • hasMaskingPolicy

      public boolean hasMaskingPolicy()