Class MaterializedView

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

public class MaterializedView extends SqlObject
  • Constructor Details

    • MaterializedView

      public MaterializedView(String name, String definition)
    • MaterializedView

      public MaterializedView(String name, List<String> columnNames, String definition)
  • Method Details

    • getDefinition

      public String getDefinition()
    • getColumnNames

      public List<String> getColumnNames()
    • hasExplicitColumnNames

      public boolean hasExplicitColumnNames()
    • getResolvedColumns

      public List<TableColumn> getResolvedColumns()
      The materialized view's columns — name and declared type — as its defining query resolved to at CREATE time, or null when they could not be resolved. What INFORMATION_SCHEMA.COLUMNS reports for it, and through that what DatabaseMetaData.getColumns answers.

      Frozen at creation exactly as a plain View's is — live-verified separately on a real account: after ALTER TABLE t ALTER COLUMN c SET DATA TYPE VARCHAR(77) the base table reports the new length while the materialized view over it still reports the old one, and a SUSPEND/RESUME refresh cycle does not move it either.

    • setResolvedColumns

      public void setResolvedColumns(List<TableColumn> resolvedColumns)
    • hasResolvedColumns

      public boolean hasResolvedColumns()
    • getWarehouse

      public String getWarehouse()
    • setWarehouse

      public void setWarehouse(String warehouse)
    • isSuspended

      public boolean isSuspended()
    • setSuspended

      public void setSuspended(boolean suspended)
    • getLastRefreshedTime

      public LocalDateTime getLastRefreshedTime()
    • setLastRefreshedTime

      public void setLastRefreshedTime(LocalDateTime lastRefreshedTime)
    • isSecure

      public boolean isSecure()
    • getOriginalDdl

      public String getOriginalDdl()
    • setOriginalDdl

      public void setOriginalDdl(String originalDdl)
    • ddl

      public String ddl(String displayName)
    • setSecure

      public void setSecure(boolean secure)
    • getObjectType

      public String getObjectType()
      Description copied from class: SqlObject
      Get the type of this SQL object (e.g., "TABLE", "VIEW", "DATABASE") Subclasses should override to provide their specific type
      Specified by:
      getObjectType in class SqlObject
      Returns:
      The object type as a string