public class RegularTable extends TableBase
tableEnginecolumns, compareMode, EXTERNAL_TABLE_ENGINE, isHidden, SYSTEM_TABLE, TABLE, TABLE_LINK, TYPE_CACHED, TYPE_MEMORY, VIEWcomment, database, traceAGGREGATE, COMMENT, CONSTANT, CONSTRAINT, FUNCTION_ALIAS, INDEX, RIGHT, ROLE, SCHEMA, SEQUENCE, SETTING, TABLE_OR_VIEW, TRIGGER, USER, USER_DATATYPE| Constructor and Description |
|---|
RegularTable(CreateTableData data) |
| Modifier and Type | Method and Description |
|---|---|
Index |
addIndex(Session session,
String indexName,
int indexId,
IndexColumn[] cols,
IndexType indexType,
boolean create,
String indexComment)
Create an index for this table
|
void |
addRow(Session session,
Row row)
Add a row to the table and all indexes.
|
boolean |
canDrop()
Check if this table can be dropped.
|
boolean |
canGetRowCount()
Check if the row count can be retrieved quickly.
|
boolean |
canTruncate()
Check if this table can be truncated.
|
ArrayList<Session> |
checkDeadlock(Session session,
Session clash,
Set<Session> visited)
Check if a deadlock occurred.
|
void |
checkRename()
Check if this object can be renamed.
|
void |
checkSupportAlter()
Check if this table supports ALTER TABLE.
|
void |
close(Session session)
Close the table object and flush changes.
|
void |
commit(short operation,
Row row)
Commit an operation (when using multi-version concurrency).
|
static Row |
createRow(Value[] data)
Create a row from the values.
|
boolean |
getContainsLargeObject() |
ArrayList<Index> |
getIndexes()
Get all indexes for this table.
|
long |
getMaxDataModificationId()
Get the last data modification id.
|
Row |
getRow(Session session,
long key)
Read the given row.
|
long |
getRowCount(Session session)
Get the row count for this table.
|
long |
getRowCountApproximation()
Get the approximated row count for this table.
|
Column |
getRowIdColumn()
Get the row id column if this table has one.
|
Index |
getScanIndex(Session session)
Get the scan index to iterate through all rows.
|
String |
getTableType()
Get the table type name
|
Index |
getUniqueIndex()
Get any unique index for this table if one exists.
|
boolean |
isDeterministic()
Check if the table is deterministic.
|
boolean |
isLockedExclusively()
Check if this table is locked exclusively.
|
boolean |
isLockedExclusivelyBy(Session session)
Check if the table is exclusively locked by this session.
|
void |
lock(Session session,
boolean exclusive,
boolean force)
Lock the table for the given session.
|
void |
removeChildrenAndResources(Session session)
Remove all dependent objects and free all resources (files, blocks in
files) of this object.
|
void |
removeRow(Session session,
Row row)
Remove a row from the table and all indexes.
|
void |
setCompareMode(CompareMode compareMode) |
void |
setRowCount(long count)
Set the row count of this table.
|
String |
toString() |
void |
truncate(Session session)
Remove all rows from the table and indexes.
|
void |
unlock(Session s)
Release the lock for this session.
|
getCreateSQL, getDropSQL, isGlobalTemporaryaddConstraint, addDependencies, addSequence, addTrigger, addView, canReference, checkWritingAllowed, compareTypeSave, doesColumnExist, dropSingleColumnConstraintsAndIndexes, findPrimaryKey, fire, fireAfterRow, fireBeforeRow, fireRow, getBestPlanItem, getCheckForeignKeyConstraints, getChildren, getColumn, getColumn, getColumns, getCompareMode, getConstraints, getCreateSQLForCopy, getDefaultValue, getIndexForColumn, getOnCommitDrop, getOnCommitTruncate, getPrimaryKey, getTemplateRow, getTemplateSimpleRow, getType, getViews, hasSelectTrigger, isHidden, isPersistData, isPersistIndexes, removeConstraint, removeIndex, removeIndexOrTransferOwnership, removeSequence, removeTrigger, removeView, rename, renameColumn, setCheckForeignKeyConstraints, setColumns, setHidden, setOnCommitDrop, setOnCommitTruncate, updateRows, validateConvertUpdateSequencegetSchema, getSQL, initSchemaObjectBasegetComment, getDatabase, getId, getModificationId, getName, initDbObjectBase, invalidate, isTemporary, setComment, setModified, setObjectName, setTemporaryclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetComment, getDatabase, getId, getName, isTemporary, setComment, setTemporarypublic RegularTable(CreateTableData data)
public void close(Session session)
Tablepublic Row getRow(Session session, long key)
session - the sessionkey - unique keypublic void addRow(Session session, Row row)
Tablepublic void commit(short operation,
Row row)
Tablepublic Index getScanIndex(Session session)
TablegetScanIndex in class Tablesession - the sessionpublic Index getUniqueIndex()
TablegetUniqueIndex in class Tablepublic ArrayList<Index> getIndexes()
TablegetIndexes in class Tablepublic Index addIndex(Session session, String indexName, int indexId, IndexColumn[] cols, IndexType indexType, boolean create, String indexComment)
Tablepublic boolean canGetRowCount()
TablecanGetRowCount in class Tablepublic boolean canDrop()
Tablepublic long getRowCount(Session session)
TablegetRowCount in class Tablesession - the sessionpublic void removeRow(Session session, Row row)
Tablepublic void truncate(Session session)
Tablepublic boolean isLockedExclusivelyBy(Session session)
TableisLockedExclusivelyBy in class Tablesession - the sessionpublic void lock(Session session, boolean exclusive, boolean force)
Tablepublic ArrayList<Session> checkDeadlock(Session session, Session clash, Set<Session> 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 boolean isLockedExclusively()
TableisLockedExclusively in class Tablepublic void unlock(Session s)
Tablepublic static Row createRow(Value[] data)
data - the value listpublic void setRowCount(long count)
count - the row countpublic void removeChildrenAndResources(Session session)
DbObjectBaseremoveChildrenAndResources in interface DbObjectremoveChildrenAndResources in class Tablesession - the sessionpublic String toString()
toString in class DbObjectBasepublic void checkRename()
DbObjectBasecheckRename in interface DbObjectcheckRename in class DbObjectBasepublic void checkSupportAlter()
TablecheckSupportAlter in class Tablepublic boolean canTruncate()
TablecanTruncate in class Tablepublic String getTableType()
TablegetTableType in class Tablepublic long getMaxDataModificationId()
TablegetMaxDataModificationId in class Tablepublic boolean getContainsLargeObject()
public long getRowCountApproximation()
TablegetRowCountApproximation in class Tablepublic void setCompareMode(CompareMode compareMode)
public boolean isDeterministic()
TableisDeterministic in class Tablepublic Column getRowIdColumn()
TablegetRowIdColumn in class TableCopyright © 2012 JBoss by Red Hat. All Rights Reserved.