public class MetaTable extends Table
| 限定符和类型 | 字段和说明 |
|---|---|
static long |
ROW_COUNT_APPROXIMATION
The approximate number of rows of a meta table.
|
columns, compareMode, isHidden, TYPE_CACHED, TYPE_MEMORYcomment, database, traceAGGREGATE, COMMENT, CONSTANT, CONSTRAINT, FUNCTION_ALIAS, INDEX, RIGHT, ROLE, SCHEMA, SEQUENCE, SETTING, TABLE_OR_VIEW, TRIGGER, USER, USER_DATATYPE| 限定符和类型 | 方法和说明 |
|---|---|
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 |
canReference()
Check if this table can be referenced.
|
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.
|
ArrayList<Row> |
generateRows(Session session,
SearchRow first,
SearchRow last)
Generate the data for the given metadata table using the given first and
last row filters.
|
String |
getCreateSQL()
Build a SQL statement to re-create this object.
|
long |
getDiskSpaceUsed() |
String |
getDropSQL()
Build a SQL statement to drop this object.
|
ArrayList<Index> |
getIndexes()
Get all indexes for this table.
|
long |
getMaxDataModificationId()
Get the last data modification id.
|
static int |
getMetaTableTypeCount()
Get the number of meta table types.
|
long |
getRowCount(Session session)
Get the row count for this table.
|
long |
getRowCountApproximation()
Get the approximated row count for this table.
|
Index |
getScanIndex(Session session)
Get the scan index to iterate through all rows.
|
TableType |
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 |
lock(Session session,
boolean exclusive,
boolean forceLockEvenInMvcc)
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 |
truncate(Session session)
Remove all rows from the table and indexes.
|
void |
unlock(Session s)
Release the lock for this session.
|
addConstraint, addDependencies, addSequence, addTrigger, addView, canTruncate, checkDeadlock, checkWritingAllowed, commit, compareTypeSafe, doesColumnExist, dropMultipleColumnsConstraintsAndIndexes, findPrimaryKey, fire, fireAfterRow, fireBeforeRow, fireRow, getBestPlanItem, getCheckForeignKeyConstraints, getChildren, getColumn, getColumn, getColumns, getCompareMode, getConstraints, getCreateSQLForCopy, getDefaultValue, getIndexForColumn, getOnCommitDrop, getOnCommitTruncate, getPrimaryKey, getRow, getRowIdColumn, getScanIndex, getTemplateRow, getTemplateSimpleRow, getType, getViews, hasSelectTrigger, isGlobalTemporary, isHidden, isLockedExclusivelyBy, isMVStore, isPersistData, isPersistIndexes, isQueryComparable, isView, removeConstraint, removeIndex, removeIndexOrTransferOwnership, removeSequence, removeTrigger, removeView, rename, renameColumn, setCheckForeignKeyConstraints, setColumns, setHidden, setOnCommitDrop, setOnCommitTruncate, updateRows, validateConvertUpdateSequencegetSchema, getSQL, initSchemaObjectBasegetComment, getDatabase, getId, getModificationId, getName, initDbObjectBase, invalidate, isTemporary, isValid, setComment, setModified, setObjectName, setTemporary, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetComment, getDatabase, getId, getName, isTemporary, setComment, setTemporarypublic static final long ROW_COUNT_APPROXIMATION
public MetaTable(Schema schema, int id, int type)
schema - the schemaid - the object idtype - the meta table typepublic String getDropSQL()
DbObjectBasegetDropSQL 在接口中 DbObjectgetDropSQL 在类中 DbObjectBasepublic String getCreateSQL()
DbObjectBasegetCreateSQL 在接口中 DbObjectgetCreateSQL 在类中 DbObjectBasepublic Index addIndex(Session session, String indexName, int indexId, IndexColumn[] cols, IndexType indexType, boolean create, String indexComment)
Tablepublic boolean lock(Session session, boolean exclusive, boolean forceLockEvenInMvcc)
Tablepublic boolean isLockedExclusively()
TableisLockedExclusively 在类中 Tablepublic ArrayList<Row> generateRows(Session session, SearchRow first, SearchRow last)
session - the sessionfirst - the first row to returnlast - the last row to returnpublic void removeRow(Session session, Row row)
Tablepublic void addRow(Session session, Row row)
Tablepublic void removeChildrenAndResources(Session session)
DbObjectBaseremoveChildrenAndResources 在接口中 DbObjectremoveChildrenAndResources 在类中 Tablesession - the sessionpublic void checkRename()
DbObjectBasecheckRename 在接口中 DbObjectcheckRename 在类中 DbObjectBasepublic void checkSupportAlter()
TablecheckSupportAlter 在类中 Tablepublic void truncate(Session session)
Tablepublic long getRowCount(Session session)
TablegetRowCount 在类中 Tablesession - the sessionpublic boolean canGetRowCount()
TablecanGetRowCount 在类中 Tablepublic boolean canDrop()
Tablepublic TableType getTableType()
TablegetTableType 在类中 Tablepublic Index getScanIndex(Session session)
TablegetScanIndex 在类中 Tablesession - the sessionpublic ArrayList<Index> getIndexes()
TablegetIndexes 在类中 Tablepublic long getMaxDataModificationId()
TablegetMaxDataModificationId 在类中 Tablepublic Index getUniqueIndex()
TablegetUniqueIndex 在类中 Tablepublic static int getMetaTableTypeCount()
public long getRowCountApproximation()
TablegetRowCountApproximation 在类中 Tablepublic long getDiskSpaceUsed()
getDiskSpaceUsed 在类中 Tablepublic boolean isDeterministic()
TableisDeterministic 在类中 Tablepublic boolean canReference()
TablecanReference 在类中 TableCopyright © 2017. All rights reserved.