columns, compareMode, EXCLUSIVE_LOCK, isHidden, READ_LOCK, TYPE_CACHED, TYPE_MEMORY, WRITE_LOCKAGGREGATE, comment, COMMENT, CONSTANT, CONSTRAINT, database, DOMAIN, FUNCTION_ALIAS, INDEX, RIGHT, ROLE, SCHEMA, SEQUENCE, SETTING, SYNONYM, TABLE_OR_VIEW, trace, TRIGGER, USERADD_PLAN_INFORMATION, DEFAULT_SQL_FLAGS, NO_CASTS, QUOTE_ONLY_WHEN_REQUIRED, REPLACE_LOBS_FOR_TRACE, TRACE_SQL_FLAGS| Constructor and Description |
|---|
MaterializedView(Schema schema,
int id,
java.lang.String name,
Table table,
Query query,
java.lang.String querySQL) |
| Modifier and Type | Method and Description |
|---|---|
void |
addDependencies(java.util.HashSet<DbObject> dependencies)
Add all objects that this table depends on to the hash set.
|
Index |
addIndex(SessionLocal session,
java.lang.String indexName,
int indexId,
IndexColumn[] cols,
int uniqueColumnCount,
IndexType indexType,
boolean create,
java.lang.String indexComment)
Create an index for this table
|
void |
addRow(SessionLocal session,
Row row)
Add a row to the table and all indexes.
|
boolean |
canDrop()
Check if this table can be dropped.
|
boolean |
canGetRowCount(SessionLocal session)
Check if the row count can be retrieved quickly.
|
boolean |
canReference()
Check if this table can be referenced.
|
void |
checkSupportAlter()
Check if this table supports ALTER TABLE.
|
void |
close(SessionLocal session)
Close the table object and flush changes.
|
PlanItem |
getBestPlanItem(SessionLocal session,
int[] masks,
TableFilter[] filters,
int filter,
SortOrder sortOrder,
AllColumnsForPlan allColumnsSet)
Get the best plan for the given search mask.
|
java.lang.String |
getCreateSQL()
Construct the CREATE ...
|
java.lang.String |
getCreateSQL(boolean orReplace,
boolean force)
Generate "CREATE" SQL statement for the materialized view.
|
java.lang.String |
getCreateSQLForCopy(Table table,
java.lang.String quotedName)
Build a SQL statement to re-create the object, or to create a copy of the
object with a different name or referencing a different table
|
java.lang.String |
getDropSQL()
Construct a DROP ...
|
java.util.ArrayList<Index> |
getIndexes()
Get all indexes for this table.
|
long |
getMaxDataModificationId()
Get the last data modification id.
|
java.lang.String |
getQuerySQL() |
long |
getRowCount(SessionLocal session)
Get the row count for this table.
|
long |
getRowCountApproximation(SessionLocal session)
Get the approximated row count for this table.
|
Index |
getScanIndex(SessionLocal session)
Get the scan index to iterate through all rows.
|
Index |
getScanIndex(SessionLocal session,
int[] masks,
TableFilter[] filters,
int filter,
SortOrder sortOrder,
AllColumnsForPlan allColumnsSet)
Get the scan index for this table.
|
Query |
getSelect() |
java.lang.StringBuilder |
getSQL(java.lang.StringBuilder builder,
int sqlFlags)
Appends the SQL statement of this object to the specified builder.
|
TableType |
getTableType()
Get the table type name
|
Table |
getUnderlyingTable() |
boolean |
isDeterministic()
Check if the table is deterministic.
|
boolean |
isInsertable()
Returns whether this table is insertable.
|
boolean |
isQueryComparable()
Check whether the table (or view) contains no columns that prevent index
conditions to be used.
|
boolean |
isView() |
void |
removeChildrenAndResources(SessionLocal session)
Delete all dependent children objects and resources of this object.
|
void |
removeRow(SessionLocal session,
Row row)
Remove a row from the table and all indexes.
|
void |
replace(Table table,
Query query,
java.lang.String querySQL) |
long |
truncate(SessionLocal session)
Remove all rows from the table and indexes.
|
addConstraint, addDependentMaterializedView, addDependentView, addSequence, addSynonym, addTrigger, canTruncate, checkDeadlock, checkWritingAllowed, compareValues, convertInsertRow, convertUpdateRow, createRow, doesColumnExist, dropMultipleColumnsConstraintsAndIndexes, findColumn, findPrimaryKey, fire, fireAfterRow, fireBeforeRow, fireRow, getCheckForeignKeyConstraints, getChildren, getColumn, getColumn, getColumn, getColumns, getCompareMode, getConstraints, getDependentMaterializedViews, getDependentViews, getDiskSpaceUsed, getIdentityColumn, getIndex, getIndexForColumn, getMainIndexColumn, getNullRow, getOnCommitDrop, getOnCommitTruncate, getPrimaryKey, getRow, getRowFactory, getRowIdColumn, getSQLTableType, getTemplateRow, getTemplateSimpleRow, getTriggers, getType, hasSelectTrigger, isGlobalTemporary, isHidden, isLockedExclusively, isLockedExclusivelyBy, isPersistData, isPersistIndexes, isRowLockable, isTableExpression, lock, lockRow, removeColumnExpressionsDependencies, removeConstraint, removeDependentMaterializedView, removeDependentView, removeIndex, removeIndexOrTransferOwnership, removeSequence, removeSynonym, removeTrigger, rename, renameColumn, setCheckForeignKeyConstraints, setColumns, setHidden, setOnCommitDrop, setOnCommitTruncate, setTableExpression, unlock, updateRow, updateRowsgetSchema, getSQLcheckRename, getComment, getCreateSQLForMeta, getDatabase, getId, getModificationId, getName, invalidate, isTemporary, isValid, setComment, setModified, setObjectName, setTemporary, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetTraceSQLpublic Table getUnderlyingTable()
public Query getSelect()
public final void close(SessionLocal session)
Tablepublic final Index addIndex(SessionLocal session, java.lang.String indexName, int indexId, IndexColumn[] cols, int uniqueColumnCount, IndexType indexType, boolean create, java.lang.String indexComment)
TableaddIndex in class Tablesession - the sessionindexName - the name of the indexindexId - the idcols - the index columnsuniqueColumnCount - the count of unique columnsindexType - the index typecreate - whether this is a new indexindexComment - the commentpublic final PlanItem getBestPlanItem(SessionLocal session, int[] masks, TableFilter[] filters, int filter, SortOrder sortOrder, AllColumnsForPlan allColumnsSet)
TablegetBestPlanItem in class Tablesession - the sessionmasks - per-column comparison bit masks, null means 'always false',
see constants in IndexConditionfilters - all joined table filtersfilter - the current table filter indexsortOrder - the sort orderallColumnsSet - the set of all columnspublic boolean isQueryComparable()
TableisQueryComparable in class Tablepublic final boolean isInsertable()
TableisInsertable in class Tablepublic final void removeRow(SessionLocal session, Row row)
Tablepublic final void addRow(SessionLocal session, Row row)
Tablepublic final void checkSupportAlter()
TablecheckSupportAlter in class Tablepublic final long truncate(SessionLocal session)
Tablepublic final long getRowCount(SessionLocal session)
TablegetRowCount in class Tablesession - the sessionpublic final boolean canGetRowCount(SessionLocal session)
TablecanGetRowCount in class Tablesession - the sessionpublic final long getRowCountApproximation(SessionLocal session)
TablegetRowCountApproximation in class Tablesession - the sessionpublic final boolean canReference()
TablecanReference in class Tablepublic final java.util.ArrayList<Index> getIndexes()
TablegetIndexes in class Tablepublic final Index getScanIndex(SessionLocal session)
TablegetScanIndex in class Tablesession - the sessionpublic Index getScanIndex(SessionLocal session, int[] masks, TableFilter[] filters, int filter, SortOrder sortOrder, AllColumnsForPlan allColumnsSet)
TablegetScanIndex in class Tablesession - the sessionmasks - the search maskfilters - the table filtersfilter - the filter indexsortOrder - the sort orderallColumnsSet - all columnspublic boolean isDeterministic()
TableisDeterministic in class Tablepublic final void addDependencies(java.util.HashSet<DbObject> dependencies)
TableaddDependencies in class Tabledependencies - the current set of dependenciespublic java.lang.String getDropSQL()
DbObjectgetDropSQL in class DbObjectpublic java.lang.String getCreateSQLForCopy(Table table, java.lang.String quotedName)
DbObjectgetCreateSQLForCopy in class DbObjecttable - the new tablequotedName - the quoted namepublic java.lang.String getCreateSQL()
DbObjectgetCreateSQL in class DbObjectpublic java.lang.String getCreateSQL(boolean orReplace,
boolean force)
orReplace - if true, then include the OR REPLACE clauseforce - if true, then include the FORCE clausepublic boolean canDrop()
Tablepublic TableType getTableType()
TablegetTableType in class Tablepublic void removeChildrenAndResources(SessionLocal session)
DbObjectremoveChildrenAndResources in class Tablesession - the sessionpublic java.lang.StringBuilder getSQL(java.lang.StringBuilder builder,
int sqlFlags)
HasSQLgetSQL in interface HasSQLgetSQL in class SchemaObjectbuilder - string buildersqlFlags - formatting flagspublic java.lang.String getQuerySQL()
public long getMaxDataModificationId()
TablegetMaxDataModificationId in class Table