| org.h2.schema.SchemaObjectBase org.h2.table.Table
All known Subclasses: org.h2.table.TableData, org.h2.table.RangeTable, org.h2.table.FunctionTable, org.h2.table.TableLink, org.h2.table.TableView, org.h2.table.MetaTable,
Table | abstract public class Table extends SchemaObjectBase (Code) | | This is the base class for most tables.
A table contains a list of columns and a list of rows.
|
Constructor Summary | |
public | Table(Schema schema, int id, String name, boolean persistent) |
Method Summary | |
public void | addConstraint(Constraint constraint) | public void | addDependencies(HashSet dependencies) | abstract public Index | addIndex(Session session, String indexName, int indexId, IndexColumn[] cols, IndexType indexType, int headPos, String comment) | abstract public void | addRow(Session session, Row row) Add a row to the table and all indexes. | public void | addSequence(Sequence sequence) | public void | addTrigger(TriggerObject trigger) | public void | addView(TableView view) | abstract public boolean | canDrop() Check if this table can be dropped. | abstract public boolean | canGetRowCount() Check if the row count can be retrieved quickly. | public boolean | canTruncate() | public void | checkColumnIsNotReferenced(Column col) | abstract public void | checkSupportAlter() Check if this table supports ALTER TABLE. | abstract public void | close(Session session) Close the table object and flush changes. | public Index | findPrimaryKey() | public void | fireAfter(Session session) | public void | fireAfterRow(Session session, Row oldRow, Row newRow) | public void | fireBefore(Session session) | public void | fireBeforeRow(Session session, Row oldRow, Row newRow) | public boolean | fireRow() | public PlanItem | getBestPlanItem(Session session, int[] masks) | public boolean | getCheckForeignKeyConstraints() | public ObjectArray | getChildren() | public Column | getColumn(int index) | public Column | getColumn(String columnName) | public Column[] | getColumns() | public Column[] | getColumns(String[] columnNames) | public ObjectArray | getConstraints() | public String | getCreateSQLForCopy(Table table, String quotedName) | public boolean | getGlobalTemporary() | public Index | getIndexForColumn(Column column, boolean first) | abstract public ObjectArray | getIndexes() Get all indexes for this table. | abstract public long | getMaxDataModificationId() Get the last data modification id. | public Row | getNullRow() | public Index | getPrimaryKey() | abstract public long | getRowCount(Session session) Get the row count for this table. | abstract public Index | getScanIndex(Session session) Get the scan index to iterate through all rows. | abstract public String | getTableType() | public Row | getTemplateRow() | public SearchRow | getTemplateSimpleRow(boolean singleColumn) | public int | getType() | abstract public Index | getUniqueIndex() Get any unique index for this table if one exists. | public boolean | isClustered() | public boolean | isLockExclusive(Session s) | abstract public boolean | isLockedExclusively() Check if this table is locked exclusively. | public boolean | isOnCommitDrop() | public boolean | isOnCommitTruncate() | public boolean | isPersistent() | abstract public void | lock(Session session, boolean exclusive, boolean force) Lock the table for the given session. | public void | removeChildrenAndResources(Session session) | public void | removeConstraint(Constraint constraint) | public void | removeIndex(Index index) | public void | removeIndexOrTransferOwnership(Session session, Index index) If the index is still required by a constraint, transfer the ownership to
it. | abstract public void | removeRow(Session session, Row row) Remove a row from the table and all indexes. | public void | removeSequence(Session session, Sequence sequence) | public void | removeTrigger(Session session, TriggerObject trigger) | public void | removeView(TableView view) | public void | renameColumn(Column column, String newName) | public void | setCheckForeignKeyConstraints(Session session, boolean enabled, boolean checkExisting) | protected void | setColumns(Column[] columns) | public void | setOnCommitDrop(boolean onCommitDrop) | public void | setOnCommitTruncate(boolean onCommitTruncate) | abstract public void | truncate(Session session) Remove all rows from the table and indexes. | abstract public void | unlock(Session s) Release the lock for this session. | public void | updateRows(Prepared prepared, Session session, RowList rows) | public void | validateConvertUpdateSequence(Session session, Row row) |
TYPE_CACHEDTYPE_MEMORY | final public static int TYPE_CACHEDTYPE_MEMORY(Code) | | |
columns | protected Column[] columns(Code) | | The columns of this table.
|
memoryPerRow | protected int memoryPerRow(Code) | | The amount of memory required for a row if all values would be very small.
|
addDependencies | public void addDependencies(HashSet dependencies)(Code) | | |
addIndex | abstract public Index addIndex(Session session, String indexName, int indexId, IndexColumn[] cols, IndexType indexType, int headPos, String comment) throws SQLException(Code) | | Create an index for this table
Parameters: session - the session Parameters: indexName - the name of the index Parameters: indexId - the id Parameters: cols - the index columns Parameters: indexType - the index type Parameters: headPos - the position of the head (if the index already exists) Parameters: comment - the comment the index |
addRow | abstract public void addRow(Session session, Row row) throws SQLException(Code) | | Add a row to the table and all indexes.
Parameters: session - the session Parameters: row - the row throws: SQLException - if a constraint was violated |
canDrop | abstract public boolean canDrop()(Code) | | Check if this table can be dropped.
true if it can |
canGetRowCount | abstract public boolean canGetRowCount()(Code) | | Check if the row count can be retrieved quickly.
true if it can |
canTruncate | public boolean canTruncate()(Code) | | |
checkSupportAlter | abstract public void checkSupportAlter() throws SQLException(Code) | | Check if this table supports ALTER TABLE.
throws: SQLException - if it is not supported |
close | abstract public void close(Session session) throws SQLException(Code) | | Close the table object and flush changes.
Parameters: session - the session |
fireRow | public boolean fireRow()(Code) | | |
getCheckForeignKeyConstraints | public boolean getCheckForeignKeyConstraints()(Code) | | |
getGlobalTemporary | public boolean getGlobalTemporary()(Code) | | |
getIndexes | abstract public ObjectArray getIndexes()(Code) | | Get all indexes for this table.
the list of indexes |
getMaxDataModificationId | abstract public long getMaxDataModificationId()(Code) | | Get the last data modification id.
the modification id |
getRowCount | abstract public long getRowCount(Session session) throws SQLException(Code) | | Get the row count for this table.
Parameters: session - the session the row count |
getScanIndex | abstract public Index getScanIndex(Session session) throws SQLException(Code) | | Get the scan index to iterate through all rows.
Parameters: session - the session the index |
getTableType | abstract public String getTableType()(Code) | | Get the table type name
the table type name |
getTemplateRow | public Row getTemplateRow()(Code) | | |
getTemplateSimpleRow | public SearchRow getTemplateSimpleRow(boolean singleColumn)(Code) | | |
getType | public int getType()(Code) | | |
getUniqueIndex | abstract public Index getUniqueIndex()(Code) | | Get any unique index for this table if one exists.
a unique index |
isClustered | public boolean isClustered()(Code) | | |
isLockedExclusively | abstract public boolean isLockedExclusively()(Code) | | Check if this table is locked exclusively.
true if it is. |
isOnCommitDrop | public boolean isOnCommitDrop()(Code) | | |
isOnCommitTruncate | public boolean isOnCommitTruncate()(Code) | | |
isPersistent | public boolean isPersistent()(Code) | | |
lock | abstract public void lock(Session session, boolean exclusive, boolean force) throws SQLException(Code) | | Lock the table for the given session.
This method waits until the lock is granted.
Parameters: session - the session Parameters: exclusive - true for write locks, false for read locks Parameters: force - lock even in the MVCC mode throws: SQLException - if a lock timeout occured |
removeIndexOrTransferOwnership | public void removeIndexOrTransferOwnership(Session session, Index index) throws SQLException(Code) | | If the index is still required by a constraint, transfer the ownership to
it. Otherwise, the index is removed.
Parameters: session - the session Parameters: index - the index that is no longer required |
removeRow | abstract public void removeRow(Session session, Row row) throws SQLException(Code) | | Remove a row from the table and all indexes.
Parameters: session - the session Parameters: row - the row |
setCheckForeignKeyConstraints | public void setCheckForeignKeyConstraints(Session session, boolean enabled, boolean checkExisting) throws SQLException(Code) | | |
setOnCommitDrop | public void setOnCommitDrop(boolean onCommitDrop)(Code) | | |
setOnCommitTruncate | public void setOnCommitTruncate(boolean onCommitTruncate)(Code) | | |
truncate | abstract public void truncate(Session session) throws SQLException(Code) | | Remove all rows from the table and indexes.
Parameters: session - the session |
unlock | abstract public void unlock(Session s)(Code) | | Release the lock for this session.
Parameters: s - the session |
|
|