Class TableBase
java.lang.Object
org.h2.engine.DbObject
org.h2.schema.SchemaObject
org.h2.table.Table
org.h2.table.TableBase
- All Implemented Interfaces:
HasSQL
- Direct Known Subclasses:
MVTable
The base class of a regular table, or a user defined table.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanprivate final StringThe table engine used (null for regular tables).Provided table parametersFields inherited from class Table
columns, compareMode, EXCLUSIVE_LOCK, isHidden, READ_LOCK, TYPE_CACHED, TYPE_MEMORY, WRITE_LOCKFields inherited from class DbObject
AGGREGATE, comment, COMMENT, CONSTANT, CONSTRAINT, database, DOMAIN, FUNCTION_ALIAS, INDEX, RIGHT, ROLE, SCHEMA, SEQUENCE, SETTING, SYNONYM, TABLE_OR_VIEW, trace, TRIGGER, USERFields inherited from interface HasSQL
ADD_PLAN_INFORMATION, DEFAULT_SQL_FLAGS, NO_CASTS, QUOTE_ONLY_WHEN_REQUIRED, REPLACE_LOBS_FOR_TRACE, TRACE_SQL_FLAGS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionConstruct the CREATE ...private StringgetCreateSQL(boolean forMeta) Construct the CREATE ...Construct a DROP ...static intgetMainIndexColumn(IndexType indexType, IndexColumn[] cols) Returns main index column if index is an primary key index and has only one column with _ROWID_ compatible data type.booleanMethods inherited from class Table
addConstraint, addDependencies, addDependentView, addIndex, addRow, addSequence, addSynonym, addTrigger, canDrop, canGetRowCount, canReference, canTruncate, checkDeadlock, checkSupportAlter, checkWritingAllowed, close, compareValues, convertInsertRow, convertUpdateRow, createRow, doesColumnExist, dropMultipleColumnsConstraintsAndIndexes, findColumn, findPrimaryKey, fire, fireAfterRow, fireBeforeRow, fireRow, getBestPlanItem, getCheckForeignKeyConstraints, getChildren, getColumn, getColumn, getColumn, getColumns, getCompareMode, getConstraints, getCreateSQLForCopy, getDependentViews, getDiskSpaceUsed, getIdentityColumn, getIndex, getIndexes, getIndexForColumn, getMainIndexColumn, getMaxDataModificationId, getNullRow, getOnCommitDrop, getOnCommitTruncate, getPrimaryKey, getRow, getRowCount, getRowCountApproximation, getRowFactory, getRowIdColumn, getScanIndex, getScanIndex, getSQLTableType, getTableType, getTemplateRow, getTemplateSimpleRow, getTriggers, getType, hasSelectTrigger, isDeterministic, isHidden, isInsertable, isLockedExclusively, isLockedExclusivelyBy, isPersistData, isPersistIndexes, isQueryComparable, isRowLockable, isTableExpression, isView, lock, lockRow, removeChildrenAndResources, removeColumnExpressionsDependencies, removeConstraint, removeDependentView, removeIndex, removeIndexOrTransferOwnership, removeRow, removeSequence, removeSynonym, removeTrigger, rename, renameColumn, setCheckForeignKeyConstraints, setColumns, setHidden, setOnCommitDrop, setOnCommitTruncate, setTableExpression, truncate, unlock, updateRow, updateRowsMethods inherited from class SchemaObject
getSchema, getSQL, getSQLMethods inherited from class DbObject
checkRename, getComment, getDatabase, getId, getModificationId, getName, invalidate, isTemporary, isValid, setComment, setModified, setObjectName, setTemporary, toStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface HasSQL
getTraceSQL
-
Field Details
-
tableEngine
The table engine used (null for regular tables). -
tableEngineParams
-
globalTemporary
private final boolean globalTemporary
-
-
Constructor Details
-
TableBase
-
-
Method Details
-
getMainIndexColumn
Returns main index column if index is an primary key index and has only one column with _ROWID_ compatible data type.- Parameters:
indexType- type of an indexcols- columns of the index- Returns:
- main index column or
SearchRow.ROWID_INDEX
-
getDropSQL
Description copied from class:DbObjectConstruct a DROP ... SQL statement for this object.- Overrides:
getDropSQLin classDbObject- Returns:
- the SQL statement
-
getCreateSQLForMeta
Description copied from class:DbObjectConstruct the CREATE ... SQL statement for this object for meta table.- Overrides:
getCreateSQLForMetain classDbObject- Returns:
- the SQL statement
-
getCreateSQL
Description copied from class:DbObjectConstruct the CREATE ... SQL statement for this object.- Specified by:
getCreateSQLin classDbObject- Returns:
- the SQL statement
-
getCreateSQL
-
isGlobalTemporary
public boolean isGlobalTemporary()- Overrides:
isGlobalTemporaryin classTable
-