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_LENGTH
YOU_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, getSegments, selectScript
delete
getGrain, getGrainPart
equals, getCelestaDoc, getName, getQuotedName, getQuotedNameIfNeeded, hashCode, limitName, limitName, setCelestaDoc
getClass, notify, notifyAll, toString, wait, wait, wait
getGrain, getName, getQuotedName, getQuotedNameIfNeeded
public static final String SURROGATE_COUNT
public static final String CHECKSUM_COMMENT_TEMPLATE
public MaterializedView(GrainPart grainPart, String name) throws ParseException
ParseException
public IntegerColumn getSurrogateCount()
public Map<String,Column<?>> getColumns()
AbstractView
getColumns
in interface HasColumns
getColumns
in interface TableElement
getColumns
in class AbstractView
public Column<?> getColumn(String colName) throws ParseException
TableElement
getColumn
in interface TableElement
colName
- column nameParseException
- if a column with the specified name is not found in the tablepublic void addColumn(Column<?> column) throws ParseException
TableElement
addColumn
in interface TableElement
column
- new columnParseException
- if the column couldn't be addedpublic void removeColumn(Column<?> column) throws ParseException
TableElement
removeColumn
in interface TableElement
column
- existing columnParseException
- if the column couldn't be removedpublic boolean hasPrimeKey()
TableElement
hasPrimeKey
in interface TableElement
public String getPkConstraintName()
TableElement
getPkConstraintName
in interface TableElement
public Map<String,Column<?>> getPrimaryKey()
TableElement
getPrimaryKey
in interface TableElement
public TableRef getRefTable()
public boolean isGroupByColumn(String alias)
public String getSelectPartOfScript()
public String getGroupByPartOfScript()
public String getChecksum()
public String getTriggerName(TriggerType type)
Copyright © 2023 CURS. All rights reserved.