public class GridH2Table
extends org.h2.table.TableBase
| Constructor and Description |
|---|
GridH2Table(org.h2.command.ddl.CreateTableData createTblData,
GridH2RowDescriptor desc,
H2RowFactory rowFactory,
GridH2SystemIndexFactory idxsFactory,
GridCacheContext cctx)
Creates table.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addColumns(List<QueryField> cols,
boolean ifNotExists)
Add new columns to this table.
|
org.h2.index.Index |
addIndex(org.h2.engine.Session ses,
String idxName,
int idxId,
org.h2.table.IndexColumn[] cols,
org.h2.index.IndexType idxType,
boolean create,
String idxComment) |
void |
addRow(org.h2.engine.Session ses,
org.h2.result.Row row) |
GridCacheContext |
cache() |
int |
cacheId() |
String |
cacheName() |
boolean |
canDrop() |
boolean |
canGetRowCount() |
void |
checkRename() |
void |
checkSupportAlter() |
void |
close(org.h2.engine.Session ses) |
boolean |
containsUserIndex(String idxName)
Check whether user index with provided name exists.
|
void |
destroy()
Destroy the table.
|
void |
dropColumns(List<String> cols,
boolean ifExists) |
org.h2.table.IndexColumn |
getAffinityKeyColumn() |
org.h2.table.Column[] |
getColumns() |
long |
getDiskSpaceUsed() |
ArrayList<org.h2.index.Index> |
getIndexes() |
long |
getMaxDataModificationId() |
long |
getRowCount(org.h2.engine.Session ses) |
long |
getRowCountApproximation() |
org.h2.index.Index |
getScanIndex(org.h2.engine.Session ses) |
org.h2.table.TableType |
getTableType() |
org.h2.index.Index |
getUniqueIndex() |
QueryTable |
identifier() |
String |
identifierString() |
org.h2.table.IndexColumn |
indexColumn(int col,
int sorting)
Creates index column for table.
|
static void |
insertHack(boolean val)
Set insert hack flag.
|
static boolean |
insertHackRequired(String sql)
Check whether insert hack is required.
|
boolean |
isDeterministic() |
boolean |
isLockedExclusively() |
boolean |
isLockedExclusivelyBy(org.h2.engine.Session ses) |
boolean |
isPartitioned() |
boolean |
lock(org.h2.engine.Session ses,
boolean exclusive,
boolean force) |
void |
markRebuildFromHashInProgress(boolean value) |
void |
proposeUserIndex(org.h2.index.Index idx)
Add index that is in an intermediate state and is still being built, thus is not used in queries until it is
promoted.
|
boolean |
rebuildFromHashInProgress() |
boolean |
remove(CacheDataRow row)
Remove row.
|
void |
removeChildrenAndResources(org.h2.engine.Session ses) |
void |
removeIndex(org.h2.index.Index h2Idx) |
void |
removeIndex(org.h2.engine.Session session,
org.h2.index.Index h2Idx)
Remove the given index from the list.
|
void |
removeRow(org.h2.engine.Session ses,
org.h2.result.Row row) |
void |
rollbackUserIndex(String idxName)
Remove user index without promoting it.
|
GridH2RowDescriptor |
rowDescriptor() |
H2RowFactory |
rowFactory() |
void |
setRemoveIndexOnDestroy(boolean rmIndex)
If flag
True, index will be destroyed when table destroy(). |
void |
truncate(org.h2.engine.Session ses) |
void |
unlock(org.h2.engine.Session ses) |
void |
update(CacheDataRow row,
CacheDataRow prevRow,
boolean prevRowAvailable)
Updates table for given key.
|
addConstraint, addDependencies, addSequence, addTrigger, addView, canReference, canTruncate, checkDeadlock, checkWritingAllowed, commit, compareTypeSafe, doesColumnExist, dropMultipleColumnsConstraintsAndIndexes, findPrimaryKey, fire, fireAfterRow, fireBeforeRow, fireRow, getBestPlanItem, getCheckForeignKeyConstraints, getChildren, getColumn, getColumn, getCompareMode, getConstraints, getCreateSQLForCopy, getDefaultValue, getIndex, getIndexForColumn, getOnCommitDrop, getOnCommitTruncate, getPrimaryKey, getRow, getRowIdColumn, getScanIndex, getTemplateRow, getTemplateSimpleRow, getType, getViews, hasSelectTrigger, isHidden, isMVStore, isPersistData, isPersistIndexes, isQueryComparable, isView, removeConstraint, removeIndexOrTransferOwnership, removeSequence, removeTrigger, removeView, rename, renameColumn, setCheckForeignKeyConstraints, setColumns, setHidden, setOnCommitDrop, setOnCommitTruncate, updateRows, validateConvertUpdateSequencegetComment, getDatabase, getId, getModificationId, getName, initDbObjectBase, invalidate, isTemporary, isValid, setComment, setModified, setObjectName, setTemporary, toStringpublic GridH2Table(org.h2.command.ddl.CreateTableData createTblData,
GridH2RowDescriptor desc,
H2RowFactory rowFactory,
GridH2SystemIndexFactory idxsFactory,
GridCacheContext cctx)
createTblData - Table description.desc - Row descriptor.rowFactory - Row factory.idxsFactory - Indexes factory.cctx - Cache context.public boolean isPartitioned()
true If this is a partitioned table.@Nullable public org.h2.table.IndexColumn getAffinityKeyColumn()
null if not available.public long getDiskSpaceUsed()
getDiskSpaceUsed in class org.h2.table.Tablepublic GridH2RowDescriptor rowDescriptor()
public String cacheName()
public int cacheId()
public GridCacheContext cache()
public boolean lock(org.h2.engine.Session ses,
boolean exclusive,
boolean force)
lock in class org.h2.table.Tablepublic QueryTable identifier()
public String identifierString()
public void close(org.h2.engine.Session ses)
close in class org.h2.table.Tablepublic void removeChildrenAndResources(org.h2.engine.Session ses)
removeChildrenAndResources in interface org.h2.engine.DbObjectremoveChildrenAndResources in class org.h2.table.Tablepublic void destroy()
public void setRemoveIndexOnDestroy(boolean rmIndex)
True, index will be destroyed when table destroy().rmIndex - Flag indicate remove index on destroy or not.public void unlock(org.h2.engine.Session ses)
unlock in class org.h2.table.Tablepublic void update(CacheDataRow row, @Nullable CacheDataRow prevRow, boolean prevRowAvailable) throws IgniteCheckedException
row - Row to be updated.prevRow - Previous row.prevRowAvailable - Whether previous row is available.IgniteCheckedException - If failed.public boolean remove(CacheDataRow row) throws IgniteCheckedException
row - Row.True if was removed.IgniteCheckedException - If failed.public void markRebuildFromHashInProgress(boolean value)
public boolean rebuildFromHashInProgress()
public org.h2.index.Index addIndex(org.h2.engine.Session ses,
String idxName,
int idxId,
org.h2.table.IndexColumn[] cols,
org.h2.index.IndexType idxType,
boolean create,
String idxComment)
addIndex in class org.h2.table.Tablepublic void proposeUserIndex(org.h2.index.Index idx)
throws IgniteCheckedException
idx - Index to add.IgniteCheckedException - If failed.public void rollbackUserIndex(String idxName)
idxName - Index name.public boolean containsUserIndex(String idxName)
idxName - Index name.True if exists.public void removeIndex(org.h2.index.Index h2Idx)
removeIndex in class org.h2.table.Tablepublic void removeIndex(org.h2.engine.Session session,
org.h2.index.Index h2Idx)
h2Idx - the index to removepublic void removeRow(org.h2.engine.Session ses,
org.h2.result.Row row)
removeRow in class org.h2.table.Tablepublic void truncate(org.h2.engine.Session ses)
truncate in class org.h2.table.Tablepublic void addRow(org.h2.engine.Session ses,
org.h2.result.Row row)
addRow in class org.h2.table.Tablepublic void checkSupportAlter()
checkSupportAlter in class org.h2.table.Tablepublic org.h2.table.TableType getTableType()
getTableType in class org.h2.table.Tablepublic org.h2.index.Index getScanIndex(org.h2.engine.Session ses)
getScanIndex in class org.h2.table.Tablepublic org.h2.index.Index getUniqueIndex()
getUniqueIndex in class org.h2.table.Tablepublic ArrayList<org.h2.index.Index> getIndexes()
getIndexes in class org.h2.table.Tablepublic boolean isLockedExclusively()
isLockedExclusively in class org.h2.table.Tablepublic boolean isLockedExclusivelyBy(org.h2.engine.Session ses)
isLockedExclusivelyBy in class org.h2.table.Tablepublic long getMaxDataModificationId()
getMaxDataModificationId in class org.h2.table.Tablepublic boolean isDeterministic()
isDeterministic in class org.h2.table.Tablepublic boolean canGetRowCount()
canGetRowCount in class org.h2.table.Tablepublic boolean canDrop()
canDrop in class org.h2.table.Tablepublic long getRowCount(@Nullable
org.h2.engine.Session ses)
getRowCount in class org.h2.table.Tablepublic long getRowCountApproximation()
getRowCountApproximation in class org.h2.table.Tablepublic void checkRename()
checkRename in interface org.h2.engine.DbObjectcheckRename in class org.h2.engine.DbObjectBasepublic org.h2.table.IndexColumn indexColumn(int col,
int sorting)
col - Column index.sorting - Sorting order SortOrderpublic H2RowFactory rowFactory()
public void addColumns(List<QueryField> cols, boolean ifNotExists)
cols - Columns to add.ifNotExists - Ignore this command if cols has size of 1 and column with given name already exists.public void dropColumns(List<String> cols, boolean ifExists)
cols - ifExists - public org.h2.table.Column[] getColumns()
getColumns in class org.h2.table.Tablepublic static void insertHack(boolean val)
val - Value.public static boolean insertHackRequired(String sql)
sql - SQL statement.True if target combination is found.
Follow @ApacheIgnite
Ignite Fabric : ver. 2.6.0 Release Date : July 10 2018