public final class MaterializedView extends AbstractView implements TableElement
| Modifier and Type | Field and Description |
|---|---|
static String |
CHECKSUM_COMMENT_TEMPLATE
Checksum comment template.
|
static String |
SURROGATE_COUNT
System field name that contains result of COUNT().
|
MAX_IDENTIFIER_LENGTHYOU_CANNOT_DROP_A_COLUMN_THAT_BELONGS_TO| Constructor and Description |
|---|
MaterializedView(GrainPart grainPart,
String name) |
| Modifier and Type | Method and Description |
|---|---|
void |
addColumn(Column<?> column)
Adds a column to the table.
|
String |
getChecksum() |
Column<?> |
getColumn(String colName)
Returns a column by its name or throws an exception with a message that
the column is not found.
|
List<String> |
getColumnRefNames() |
Map<String,Column<?>> |
getColumns()
Returns a map of columns of the view.
|
String |
getGroupByPartOfScript() |
String |
getPkConstraintName()
Returns PK constraint name.
|
Map<String,Column<?>> |
getPrimaryKey()
Returns unmodified map of primary key columns.
|
TableRef |
getRefTable() |
String |
getSelectPartOfScript() |
IntegerColumn |
getSurrogateCount() |
String |
getTriggerName(TriggerType type) |
boolean |
hasPrimeKey()
Whether the table has primary key.
|
boolean |
isGroupByColumn(String alias) |
void |
removeColumn(Column<?> column)
Removes a column from the table.
|
getAggregateColumns, getColumnIndex, getColumnRef, getTables, selectScriptdeletegetGrain, getGrainPartequals, getCelestaDoc, getName, getQuotedName, getQuotedNameIfNeeded, hashCode, limitName, limitName, setCelestaDocgetClass, notify, notifyAll, toString, wait, wait, waitgetGrain, getName, getQuotedNamepublic static final String SURROGATE_COUNT
public static final String CHECKSUM_COMMENT_TEMPLATE
public MaterializedView(GrainPart grainPart, String name) throws ParseException
ParseExceptionpublic IntegerColumn getSurrogateCount()
public Map<String,Column<?>> getColumns()
AbstractViewgetColumns in interface HasColumnsgetColumns in interface TableElementgetColumns in class AbstractViewpublic Column<?> getColumn(String colName) throws ParseException
TableElementgetColumn in interface TableElementcolName - column nameParseException - if a column with the specified name is not found in the tablepublic void addColumn(Column<?> column) throws ParseException
TableElementaddColumn in interface TableElementcolumn - new columnParseException - if the column couldn't be addedpublic void removeColumn(Column<?> column) throws ParseException
TableElementremoveColumn in interface TableElementcolumn - existing columnParseException - if the column couldn't be removedpublic boolean hasPrimeKey()
TableElementhasPrimeKey in interface TableElementpublic String getPkConstraintName()
TableElementgetPkConstraintName in interface TableElementpublic Map<String,Column<?>> getPrimaryKey()
TableElementgetPrimaryKey in interface TableElementpublic TableRef getRefTable()
public boolean isGroupByColumn(String alias)
public String getSelectPartOfScript()
public String getGroupByPartOfScript()
public String getChecksum()
public String getTriggerName(TriggerType type)
Copyright © 2020 CURS. All rights reserved.