| Modifier and Type | Field and Description |
|---|---|
static DebuggingThreadLocal<java.util.ArrayList<java.lang.String>> |
EXCLUSIVE_LOCKS
The table names this thread has exclusively locked.
|
static DebuggingThreadLocal<java.util.ArrayList<java.lang.String>> |
SHARED_LOCKS
The tables names this thread has a shared lock on.
|
static DebuggingThreadLocal<java.lang.String> |
WAITING_FOR_LOCK
The table name this thread is waiting to lock.
|
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 |
|---|
MVTable(CreateTableData data,
Store store) |
| Modifier and Type | Method and Description |
|---|---|
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 |
canTruncate()
Check if this table can be truncated.
|
java.util.ArrayList<SessionLocal> |
checkDeadlock(SessionLocal session,
SessionLocal clash,
java.util.Set<SessionLocal> visited)
Check if a deadlock occurred.
|
void |
checkSupportAlter()
Check if this table supports ALTER TABLE.
|
void |
close(SessionLocal session)
Close the table object and flush changes.
|
void |
commit()
Mark the transaction as committed, so that the modification counter of
the database is incremented.
|
boolean |
getContainsLargeObject() |
long |
getDiskSpaceUsed() |
java.util.ArrayList<Index> |
getIndexes()
Get all indexes for this table.
|
int |
getMainIndexColumn()
Returns ID of main index column, or
SearchRow.ROWID_INDEX. |
java.lang.String |
getMapName() |
long |
getMaxDataModificationId()
Get the last data modification id.
|
Row |
getRow(SessionLocal session,
long key)
Get the given row.
|
long |
getRowCount(SessionLocal session)
Get the row count for this table.
|
long |
getRowCountApproximation(SessionLocal session)
Get the approximated row count for this table.
|
Column |
getRowIdColumn()
Get the row id column if this table has one.
|
Index |
getScanIndex(SessionLocal session)
Get the scan index to iterate through all rows.
|
TableType |
getTableType()
Get the table type name
|
protected void |
invalidate()
Set the main attributes to null to make sure the object is no longer
used.
|
boolean |
isDeterministic()
Check if the table is deterministic.
|
boolean |
isLockedExclusively()
Check if this table is locked exclusively.
|
boolean |
isLockedExclusivelyBy(SessionLocal session)
Check if the table is exclusively locked by this session.
|
boolean |
isRowLockable()
Views, function tables, links, etc.
|
boolean |
lock(SessionLocal session,
int lockType)
Lock the table for the given session.
|
Row |
lockRow(SessionLocal session,
Row row,
int timeoutMillis)
Locks row, preventing any updated to it, except from the session specified.
|
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.
|
java.lang.String |
toString() |
long |
truncate(SessionLocal session)
Remove all rows from the table and indexes.
|
void |
unlock(SessionLocal s)
Release the lock for this session.
|
void |
updateRow(SessionLocal session,
Row oldRow,
Row newRow)
Update a row to the table and all indexes.
|
getCreateSQL, getCreateSQLForMeta, getDropSQL, getMainIndexColumn, isGlobalTemporaryaddConstraint, addDependencies, addDependentMaterializedView, addDependentView, addSequence, addSynonym, addTrigger, canReference, checkWritingAllowed, compareValues, convertInsertRow, convertUpdateRow, createRow, doesColumnExist, dropMultipleColumnsConstraintsAndIndexes, findColumn, findPrimaryKey, fire, fireAfterRow, fireBeforeRow, fireRow, getBestPlanItem, getCheckForeignKeyConstraints, getChildren, getColumn, getColumn, getColumn, getColumns, getCompareMode, getConstraints, getDependentMaterializedViews, getDependentViews, getIdentityColumn, getIndex, getIndexForColumn, getNullRow, getOnCommitDrop, getOnCommitTruncate, getPrimaryKey, getRowFactory, getScanIndex, getSQLTableType, getTemplateRow, getTemplateSimpleRow, getTriggers, getType, hasSelectTrigger, isHidden, isInsertable, isPersistData, isPersistIndexes, isQueryComparable, isTableExpression, isView, removeColumnExpressionsDependencies, removeConstraint, removeDependentMaterializedView, removeDependentView, removeIndex, removeIndexOrTransferOwnership, removeSequence, removeSynonym, removeTrigger, rename, renameColumn, setCheckForeignKeyConstraints, setColumns, setHidden, setOnCommitDrop, setOnCommitTruncate, setTableExpression, updateRowsgetSchema, getSQL, getSQLcheckRename, getComment, getCreateSQLForCopy, getDatabase, getId, getModificationId, getName, isTemporary, isValid, setComment, setModified, setObjectName, setTemporaryclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetTraceSQLpublic static final DebuggingThreadLocal<java.lang.String> WAITING_FOR_LOCK
public static final DebuggingThreadLocal<java.util.ArrayList<java.lang.String>> EXCLUSIVE_LOCKS
public static final DebuggingThreadLocal<java.util.ArrayList<java.lang.String>> SHARED_LOCKS
public MVTable(CreateTableData data, Store store)
public java.lang.String getMapName()
public boolean lock(SessionLocal session, int lockType)
Tablepublic void unlock(SessionLocal s)
Tablepublic void close(SessionLocal session)
Tablepublic Row getRow(SessionLocal session, long key)
Tablepublic 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 void removeRow(SessionLocal session, Row row)
Tablepublic long truncate(SessionLocal session)
Tablepublic void addRow(SessionLocal session, Row row)
Tablepublic void updateRow(SessionLocal session, Row oldRow, Row newRow)
Tablepublic Row lockRow(SessionLocal session, Row row, int timeoutMillis)
Tablepublic Index getScanIndex(SessionLocal session)
TablegetScanIndex in class Tablesession - the sessionpublic java.util.ArrayList<Index> getIndexes()
TablegetIndexes in class Tablepublic long getMaxDataModificationId()
TablegetMaxDataModificationId in class Tablepublic void removeChildrenAndResources(SessionLocal session)
DbObjectremoveChildrenAndResources in class Tablesession - the sessionpublic long getRowCount(SessionLocal session)
TablegetRowCount in class Tablesession - the sessionpublic long getRowCountApproximation(SessionLocal session)
TablegetRowCountApproximation in class Tablesession - the sessionpublic long getDiskSpaceUsed()
getDiskSpaceUsed in class Tablepublic boolean isRowLockable()
TableisRowLockable in class Tablepublic void commit()
public int getMainIndexColumn()
TableSearchRow.ROWID_INDEX.getMainIndexColumn in class TableSearchRow.ROWID_INDEXpublic boolean canDrop()
Tablepublic boolean canGetRowCount(SessionLocal session)
TablecanGetRowCount in class Tablesession - the sessionpublic boolean canTruncate()
TablecanTruncate in class Tablepublic java.util.ArrayList<SessionLocal> checkDeadlock(SessionLocal session, SessionLocal clash, java.util.Set<SessionLocal> visited)
TablecheckDeadlock in class Tablesession - the session to be tested forclash - set with sessions already visited, and null when starting
verificationvisited - set with sessions already visited, and null when starting
verificationpublic void checkSupportAlter()
TablecheckSupportAlter in class Tablepublic boolean getContainsLargeObject()
public Column getRowIdColumn()
TablegetRowIdColumn in class Tablepublic TableType getTableType()
TablegetTableType in class Tablepublic boolean isDeterministic()
TableisDeterministic in class Tablepublic boolean isLockedExclusively()
TableisLockedExclusively in class Tablepublic boolean isLockedExclusivelyBy(SessionLocal session)
TableisLockedExclusivelyBy in class Tablesession - the sessionprotected void invalidate()
DbObjectinvalidate in class DbObject