|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.h2.engine.DbObjectBase
org.h2.schema.SchemaObjectBase
org.h2.table.Table
org.h2.table.TableBase
org.h2.mvstore.db.MVTable
public class MVTable
A table stored in a MVStore.
| Field Summary |
|---|
| Fields inherited from class org.h2.table.Table |
|---|
columns, compareMode, EXTERNAL_TABLE_ENGINE, isHidden, SYSTEM_TABLE, TABLE, TABLE_LINK, TYPE_CACHED, TYPE_MEMORY, VIEW |
| Fields inherited from class org.h2.engine.DbObjectBase |
|---|
comment, database, trace |
| Fields inherited from interface org.h2.engine.DbObject |
|---|
AGGREGATE, COMMENT, CONSTANT, CONSTRAINT, FUNCTION_ALIAS, INDEX, RIGHT, ROLE, SCHEMA, SEQUENCE, SETTING, TABLE_OR_VIEW, TRIGGER, USER, USER_DATATYPE |
| Constructor Summary | |
|---|---|
MVTable(CreateTableData data,
MVTableEngine.Store store)
|
|
| Method Summary | |
|---|---|
Index |
addIndex(Session session,
java.lang.String indexName,
int indexId,
IndexColumn[] cols,
IndexType indexType,
boolean create,
java.lang.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. |
java.util.ArrayList<Session> |
checkDeadlock(Session session,
Session clash,
java.util.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()
Mark the transaction as committed, so that the modification counter of the database is incremented. |
boolean |
getContainsLargeObject()
|
long |
getDiskSpaceUsed()
|
java.util.ArrayList<Index> |
getIndexes()
Get all indexes for this table. |
java.lang.String |
getMapName()
|
long |
getMaxDataModificationId()
Get the last data modification id. |
Row |
getRow(Session session,
long key)
Get 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. |
java.lang.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. |
boolean |
isMVStore()
|
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. |
java.lang.String |
toString()
|
void |
truncate(Session session)
Remove all rows from the table and indexes. |
void |
unlock(Session s)
Release the lock for this session. |
| Methods inherited from class org.h2.table.TableBase |
|---|
getCreateSQL, getDropSQL, isGlobalTemporary |
| Methods inherited from class org.h2.schema.SchemaObjectBase |
|---|
getSchema, getSQL, initSchemaObjectBase |
| Methods inherited from class org.h2.engine.DbObjectBase |
|---|
getComment, getDatabase, getId, getModificationId, getName, initDbObjectBase, invalidate, isTemporary, setComment, setModified, setObjectName, setTemporary |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.h2.engine.DbObject |
|---|
getComment, getDatabase, getId, getName, isTemporary, setComment, setTemporary |
| Constructor Detail |
|---|
public MVTable(CreateTableData data,
MVTableEngine.Store store)
| Method Detail |
|---|
public java.lang.String getMapName()
public void lock(Session session,
boolean exclusive,
boolean force)
Table
lock in class Tablesession - the sessionexclusive - true for write locks, false for read locksforce - lock even in the MVCC mode
public java.util.ArrayList<Session> checkDeadlock(Session session,
Session clash,
java.util.Set<Session> visited)
Table
checkDeadlock 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
verification
public boolean isLockedExclusively()
Table
isLockedExclusively in class Tablepublic boolean isLockedExclusivelyBy(Session session)
Table
isLockedExclusivelyBy in class Tablesession - the session
public void unlock(Session s)
Table
unlock in class Tables - the sessionpublic boolean canTruncate()
Table
canTruncate in class Tablepublic void close(Session session)
Table
close in class Tablesession - the session
public Row getRow(Session session,
long key)
Table
getRow in class Tablesession - the sessionkey - the primary key
public Index addIndex(Session session,
java.lang.String indexName,
int indexId,
IndexColumn[] cols,
IndexType indexType,
boolean create,
java.lang.String indexComment)
Table
addIndex in class Tablesession - the sessionindexName - the name of the indexindexId - the idcols - the index columnsindexType - the index typecreate - whether this is a new indexindexComment - the comment
public void removeRow(Session session,
Row row)
Table
removeRow in class Tablesession - the sessionrow - the rowpublic void truncate(Session session)
Table
truncate in class Tablesession - the session
public void addRow(Session session,
Row row)
Table
addRow in class Tablesession - the sessionrow - the rowpublic void checkSupportAlter()
Table
checkSupportAlter in class Tablepublic java.lang.String getTableType()
Table
getTableType in class Tablepublic Index getScanIndex(Session session)
Table
getScanIndex in class Tablesession - the session
public Index getUniqueIndex()
Table
getUniqueIndex in class Tablepublic java.util.ArrayList<Index> getIndexes()
Table
getIndexes in class Tablepublic long getMaxDataModificationId()
Table
getMaxDataModificationId in class Tablepublic boolean getContainsLargeObject()
public boolean isDeterministic()
Table
isDeterministic in class Tablepublic boolean canGetRowCount()
Table
canGetRowCount in class Tablepublic boolean canDrop()
Table
canDrop in class Tablepublic void removeChildrenAndResources(Session session)
DbObjectBase
removeChildrenAndResources in interface DbObjectremoveChildrenAndResources in class Tablesession - the sessionpublic long getRowCount(Session session)
Table
getRowCount in class Tablesession - the session
public long getRowCountApproximation()
Table
getRowCountApproximation in class Tablepublic long getDiskSpaceUsed()
getDiskSpaceUsed in class Tablepublic void checkRename()
DbObjectBase
checkRename in interface DbObjectcheckRename in class DbObjectBasepublic Column getRowIdColumn()
Table
getRowIdColumn in class Tablepublic java.lang.String toString()
toString in class DbObjectBasepublic boolean isMVStore()
isMVStore in class Tablepublic void commit()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||