public class RangeTable extends Table
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ALIAS
The PostgreSQL alias for the range table.
|
static java.lang.String |
NAME
The name of the range table.
|
columns, compareMode, isHidden, TYPE_CACHED, TYPE_MEMORYcomment, database, traceAGGREGATE, COMMENT, CONSTANT, CONSTRAINT, FUNCTION_ALIAS, INDEX, RIGHT, ROLE, SCHEMA, SEQUENCE, SETTING, SYNONYM, TABLE_OR_VIEW, TRIGGER, USER, USER_DATATYPE| Constructor and Description |
|---|
RangeTable(Schema schema,
Expression min,
Expression max,
boolean noColumns)
Create a new range with the given start and end expressions.
|
RangeTable(Schema schema,
Expression min,
Expression max,
Expression step,
boolean noColumns) |
| Modifier and Type | Method and Description |
|---|---|
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 |
canReference()
Check if this table can be referenced.
|
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.
|
java.lang.String |
getCreateSQL()
Build a SQL statement to re-create this object.
|
long |
getDiskSpaceUsed() |
java.lang.String |
getDropSQL()
Build a SQL statement to drop this object.
|
java.util.ArrayList<Index> |
getIndexes()
Get all indexes for this table.
|
long |
getMax(Session session)
Calculate and get the end value of this range.
|
long |
getMaxDataModificationId()
Get the last data modification id.
|
long |
getMin(Session session)
Calculate and get the start value of this range.
|
long |
getRowCount(Session session)
Get the row count for this table.
|
long |
getRowCountApproximation()
Get the approximated row count for this table.
|
Index |
getScanIndex(Session session)
Get the scan index to iterate through all rows.
|
java.lang.String |
getSQL()
Get the SQL name of this object (may be quoted).
|
long |
getStep(Session session)
Get the increment.
|
TableType |
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 |
lock(Session session,
boolean exclusive,
boolean forceLockEvenInMvcc)
Lock the table for the given session.
|
void |
removeRow(Session session,
Row row)
Remove a row from the table and all indexes.
|
void |
truncate(Session session)
Remove all rows from the table and indexes.
|
void |
unlock(Session s)
Release the lock for this session.
|
addConstraint, addDependencies, addDependentView, addSequence, addSynonym, addTrigger, canTruncate, checkDeadlock, checkWritingAllowed, commit, compareTypeSafe, doesColumnExist, dropMultipleColumnsConstraintsAndIndexes, findPrimaryKey, fire, fireAfterRow, fireBeforeRow, fireRow, getBestPlanItem, getCheckForeignKeyConstraints, getChildren, getColumn, getColumn, getColumns, getCompareMode, getConstraints, getCreateSQLForCopy, getDefaultValue, getDependentViews, getIndex, getIndexForColumn, getOnCommitDrop, getOnCommitTruncate, getOnUpdateValue, getPrimaryKey, getRow, getRowIdColumn, getScanIndex, getTemplateRow, getTemplateSimpleRow, getType, hasSelectTrigger, isGlobalTemporary, isHidden, isLockedExclusivelyBy, isMVStore, isPersistData, isPersistIndexes, isQueryComparable, isTableExpression, isView, removeChildrenAndResources, removeConstraint, removeDependentView, removeIndex, removeIndexOrTransferOwnership, removeSequence, removeSynonym, removeTrigger, rename, renameColumn, setCheckForeignKeyConstraints, setColumns, setHidden, setOnCommitDrop, setOnCommitTruncate, setTableExpression, updateRows, validateConvertUpdateSequencegetSchema, initSchemaObjectBasegetComment, getDatabase, getId, getModificationId, getName, initDbObjectBase, invalidate, isTemporary, isValid, setComment, setModified, setObjectName, setTemporary, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetComment, getDatabase, getId, getName, isTemporary, setComment, setTemporarypublic static final java.lang.String NAME
public static final java.lang.String ALIAS
public RangeTable(Schema schema, Expression min, Expression max, boolean noColumns)
schema - the schema (always the main schema)min - the start expressionmax - the end expressionnoColumns - whether this table has no columnspublic RangeTable(Schema schema, Expression min, Expression max, Expression step, boolean noColumns)
public java.lang.String getDropSQL()
DbObjectBasegetDropSQL in interface DbObjectgetDropSQL in class DbObjectBasepublic java.lang.String getCreateSQL()
DbObjectBasegetCreateSQL in interface DbObjectgetCreateSQL in class DbObjectBasepublic java.lang.String getSQL()
DbObjectgetSQL in interface DbObjectgetSQL in class SchemaObjectBasepublic boolean lock(Session session, boolean exclusive, boolean forceLockEvenInMvcc)
Tablepublic void close(Session session)
Tablepublic void unlock(Session s)
Tablepublic boolean isLockedExclusively()
TableisLockedExclusively in class Tablepublic Index addIndex(Session session, java.lang.String indexName, int indexId, IndexColumn[] cols, IndexType indexType, boolean create, java.lang.String indexComment)
Tablepublic void removeRow(Session session, Row row)
Tablepublic void addRow(Session session, Row row)
Tablepublic void checkSupportAlter()
TablecheckSupportAlter in class Tablepublic void checkRename()
DbObjectBasecheckRename in interface DbObjectcheckRename in class DbObjectBasepublic boolean canGetRowCount()
TablecanGetRowCount in class Tablepublic boolean canDrop()
Tablepublic long getRowCount(Session session)
TablegetRowCount in class Tablesession - the sessionpublic TableType getTableType()
TablegetTableType in class Tablepublic Index getScanIndex(Session session)
TablegetScanIndex in class Tablesession - the sessionpublic long getMin(Session session)
session - the sessionpublic long getMax(Session session)
session - the sessionpublic long getStep(Session session)
session - the sessionpublic java.util.ArrayList<Index> getIndexes()
TablegetIndexes in class Tablepublic void truncate(Session session)
Tablepublic long getMaxDataModificationId()
TablegetMaxDataModificationId in class Tablepublic Index getUniqueIndex()
TablegetUniqueIndex in class Tablepublic long getRowCountApproximation()
TablegetRowCountApproximation in class Tablepublic long getDiskSpaceUsed()
getDiskSpaceUsed in class Tablepublic boolean isDeterministic()
TableisDeterministic in class Tablepublic boolean canReference()
TablecanReference in class Table