Top Description Fields Constructors Methods
org.h2.table

public abstract Class TableBase

extends Table
Class Inheritance
Known Direct Subclasses
org.h2.mvstore.db.MVTable
Imports
java.util.Collections, .List, org.h2.command.ddl.CreateTableData, org.h2.engine.Database, org.h2.index.IndexType, org.h2.result.SearchRow, .SortOrder, org.h2.util.StringUtils, org.h2.value.Value

The base class of a regular table, or a user defined table.
Authors
Thomas Mueller, Sergi Vladykin

Field Summary

Modifier and TypeField and Description
private final boolean
private final String
tableEngine

The table engine used (null for regular tables).

private final List<String>
tableEngineParams

Provided table parameters

Inherited from org.h2.table.Table:
columnscompareModeEXCLUSIVE_LOCKREAD_LOCKTYPE_CACHEDTYPE_MEMORYWRITE_LOCK

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String
getCreateSQL()

Implements abstract org.h2.engine.DbObject.getCreateSQL.

Construct the CREATE ...

private String
getCreateSQL(boolean forMeta)

public String
public String
getDropSQL()

Overrides org.h2.engine.DbObject.getDropSQL.

Construct a DROP ...

public static int

Returns:

main index column or SearchRow#ROWID_INDEX
getMainIndexColumn
(IndexType
type of an index
indexType
,
IndexColumn[]
columns of the index
cols
)

Returns main index column if index is an primary key index and has only one column with _ROWID_ compatible data type.

public boolean
Inherited from org.h2.table.Table:
addConstraintaddDependenciesaddDependentMaterializedViewaddDependentViewaddIndexaddRowaddSequenceaddSynonymaddTriggercanDropcanGetRowCountcanReferencecanTruncatecheckDeadlockcheckSupportAltercheckWritingAllowedclosecompareValuesconvertInsertRowconvertUpdateRowcreateRowdoesColumnExistdropMultipleColumnsConstraintsAndIndexesfindColumnfindPrimaryKeyfirefireAfterRowfireBeforeRowfireRowgetBestPlanItemgetCheckForeignKeyConstraintsgetChildrengetColumngetColumngetColumngetColumnsgetCompareModegetConstraintsgetDependentMaterializedViewsgetDependentViewsgetDiskSpaceUsedgetIdentityColumngetIndexgetIndexesgetIndexForColumngetMainIndexColumngetMaxDataModificationIdgetNullRowgetOnCommitDropgetOnCommitTruncategetPrimaryKeygetRowgetRowCountgetRowCountApproximationgetRowFactorygetRowIdColumngetScanIndexgetScanIndexgetSQLTableTypegetTableTypegetTemplateRowgetTemplateSimpleRowgetTriggersgetTypegetVisibleColumnshasSelectTriggerisDeterministicisInsertableisLockedExclusivelyisLockedExclusivelyByisPersistDataisPersistIndexesisQueryComparableisRowLockableisViewlocklockRowremoveChildrenAndResourcesremoveColumnExpressionsDependenciesremoveConstraintremoveDependentMaterializedViewremoveDependentViewremoveIndexremoveIndexOrTransferOwnershipremoveRowremoveSequenceremoveSynonymremoveTriggerrenamerenameColumnsetCheckForeignKeyConstraintssetColumnssetOnCommitDropsetOnCommitTruncatetruncateunlockupdateRowupdateRows

Field Detail

globalTemporaryback to summary
private final boolean globalTemporary
tableEngineback to summary
private final String tableEngine

The table engine used (null for regular tables).

tableEngineParamsback to summary
private final List<String> tableEngineParams

Provided table parameters

Constructor Detail

TableBaseback to summary
public TableBase(CreateTableData data)

Method Detail

getCreateSQLback to summary
public String getCreateSQL()

Implements abstract org.h2.engine.DbObject.getCreateSQL.

Doc from org.h2.engine.DbObject.getCreateSQL.

Construct the CREATE ... SQL statement for this object.

Returns:String

the SQL statement

Annotations
@Override
getCreateSQLback to summary
private String getCreateSQL(boolean forMeta)
getCreateSQLForMetaback to summary
public String getCreateSQLForMeta()

Overrides org.h2.engine.DbObject.getCreateSQLForMeta.

Doc from org.h2.engine.DbObject.getCreateSQLForMeta.

Construct the CREATE ... SQL statement for this object for meta table.

Returns:String

the SQL statement

Annotations
@Override
getDropSQLback to summary
public String getDropSQL()

Overrides org.h2.engine.DbObject.getDropSQL.

Doc from org.h2.engine.DbObject.getDropSQL.

Construct a DROP ... SQL statement for this object.

Returns:String

the SQL statement

Annotations
@Override
getMainIndexColumnback to summary
public static int getMainIndexColumn(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.

Parameters
indexType:IndexType

type of an index

cols:IndexColumn[]

columns of the index

Returns:int

main index column or SearchRow#ROWID_INDEX

isGlobalTemporaryback to summary
public boolean isGlobalTemporary()

Overrides org.h2.table.Table.isGlobalTemporary.

Annotations
@Override