columns, compareMode, EXCLUSIVE_LOCK, isHidden, READ_LOCK, TYPE_CACHED, TYPE_MEMORY, WRITE_LOCKAGGREGATE, comment, COMMENT, CONSTANT, CONSTRAINT, database, DOMAIN, FUNCTION_ALIAS, INDEX, RIGHT, ROLE, SCHEMA, SEQUENCE, SETTING, SYNONYM, TABLE_OR_VIEW, trace, TRIGGER, USERADD_PLAN_INFORMATION, DEFAULT_SQL_FLAGS, NO_CASTS, QUOTE_ONLY_WHEN_REQUIRED, REPLACE_LOBS_FOR_TRACE, TRACE_SQL_FLAGS| Constructor and Description |
|---|
TableLink(Schema schema,
int id,
java.lang.String name,
java.lang.String driver,
java.lang.String url,
java.lang.String user,
java.lang.String password,
java.lang.String originalSchema,
java.lang.String originalTable,
boolean emitUpdates,
boolean force) |
| Modifier and Type | Method and Description |
|---|---|
Index |
addIndex(SessionLocal session,
java.lang.String indexName,
int indexId,
IndexColumn[] cols,
int uniqueColumnCount,
IndexType indexType,
boolean create,
java.lang.String indexComment)
Create an index for this table
|
void |
addRow(SessionLocal session,
Row row)
Add a row to the table and all indexes.
|
boolean |
canDrop()
Check if this table can be dropped.
|
boolean |
canGetRowCount(SessionLocal session)
Check if the row count can be retrieved quickly.
|
void |
checkSupportAlter()
Check if this table supports ALTER TABLE.
|
void |
checkWritingAllowed()
Linked tables don't know if they are readonly.
|
void |
close(SessionLocal session)
Close the table object and flush changes.
|
void |
convertInsertRow(SessionLocal session,
Row row,
java.lang.Boolean overridingSystem)
Prepares the specified row for INSERT operation.
|
void |
convertUpdateRow(SessionLocal session,
Row row,
boolean fromTrigger)
Prepares the specified row for UPDATE operation.
|
java.sql.PreparedStatement |
execute(java.lang.String sql,
java.util.ArrayList<Value> params,
boolean reusePrepared,
SessionLocal session)
Execute a SQL statement using the given parameters.
|
boolean |
getAutocommit()
The autocommit mode
|
java.lang.String |
getCreateSQL()
Construct the CREATE ...
|
java.lang.String |
getDropSQL()
Construct a DROP ...
|
int |
getFetchSize()
The number of rows to fetch
default is 0
|
java.lang.String |
getIdentifierQuoteString()
Returns the identifier quote string or space.
|
java.util.ArrayList<Index> |
getIndexes()
Get all indexes for this table.
|
long |
getMaxDataModificationId()
Get the last data modification id.
|
java.lang.String |
getQualifiedTable() |
long |
getRowCount(SessionLocal session)
Get the row count for this table.
|
long |
getRowCountApproximation(SessionLocal session)
Get the approximated row count for this table.
|
Index |
getScanIndex(SessionLocal session)
Get the scan index to iterate through all rows.
|
TableType |
getTableType()
Get the table type name
|
boolean |
isDeterministic()
Check if the table is deterministic.
|
boolean |
isInsertable()
Returns whether this table is insertable.
|
boolean |
isOracle() |
void |
removeChildrenAndResources(SessionLocal session)
Delete all dependent children objects and resources of this object.
|
void |
removeRow(SessionLocal session,
Row row)
Remove a row from the table and all indexes.
|
void |
reusePreparedStatement(java.sql.PreparedStatement prep,
java.lang.String sql)
Add this prepared statement to the list of cached statements.
|
void |
setAutoCommit(boolean mode)
Specify if the autocommit mode is activated or not
|
void |
setFetchSize(int fetchSize)
Specify the number of rows fetched by the linked table command
|
void |
setGlobalTemporary(boolean globalTemporary) |
void |
setReadOnly(boolean readOnly) |
long |
truncate(SessionLocal session)
Remove all rows from the table and indexes.
|
void |
updateRows(Prepared prepared,
SessionLocal session,
LocalResult rows)
Update a list of rows in this table.
|
static DbException |
wrapException(java.lang.String sql,
java.lang.Exception ex)
Wrap a SQL exception that occurred while accessing a linked table.
|
addConstraint, addDependencies, addDependentView, addSequence, addSynonym, addTrigger, canReference, canTruncate, checkDeadlock, compareValues, createRow, doesColumnExist, dropMultipleColumnsConstraintsAndIndexes, findColumn, findPrimaryKey, fire, fireAfterRow, fireBeforeRow, fireRow, getBestPlanItem, getCheckForeignKeyConstraints, getChildren, getColumn, getColumn, getColumn, getColumns, getCompareMode, getConstraints, getDependentViews, getDiskSpaceUsed, getIdentityColumn, getIndex, getIndexForColumn, getMainIndexColumn, getNullRow, getOnCommitDrop, getOnCommitTruncate, getPrimaryKey, getRow, getRowFactory, getRowIdColumn, getScanIndex, getSQLTableType, getTemplateRow, getTemplateSimpleRow, getTriggers, getType, hasSelectTrigger, isGlobalTemporary, isHidden, isLockedExclusively, isLockedExclusivelyBy, isPersistData, isPersistIndexes, isQueryComparable, isRowLockable, isTableExpression, isView, lock, lockRow, removeColumnExpressionsDependencies, removeConstraint, removeDependentView, removeIndex, removeIndexOrTransferOwnership, removeSequence, removeSynonym, removeTrigger, rename, renameColumn, setCheckForeignKeyConstraints, setColumns, setHidden, setOnCommitDrop, setOnCommitTruncate, setTableExpression, unlock, updateRowgetSchema, getSQL, getSQLcheckRename, getComment, getCreateSQLForCopy, getCreateSQLForMeta, getDatabase, getId, getModificationId, getName, invalidate, isTemporary, isValid, setComment, setModified, setObjectName, setTemporary, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetTraceSQLpublic TableLink(Schema schema, int id, java.lang.String name, java.lang.String driver, java.lang.String url, java.lang.String user, java.lang.String password, java.lang.String originalSchema, java.lang.String originalTable, boolean emitUpdates, boolean force)
public java.lang.String getDropSQL()
DbObjectgetDropSQL in class DbObjectpublic java.lang.String getCreateSQL()
DbObjectgetCreateSQL in class DbObjectpublic Index addIndex(SessionLocal session, java.lang.String indexName, int indexId, IndexColumn[] cols, int uniqueColumnCount, IndexType indexType, boolean create, java.lang.String indexComment)
TableaddIndex in class Tablesession - the sessionindexName - the name of the indexindexId - the idcols - the index columnsuniqueColumnCount - the count of unique columnsindexType - the index typecreate - whether this is a new indexindexComment - the commentpublic Index getScanIndex(SessionLocal session)
TablegetScanIndex in class Tablesession - the sessionpublic boolean isInsertable()
TableisInsertable in class Tablepublic void removeRow(SessionLocal session, Row row)
Tablepublic void addRow(SessionLocal session, Row row)
Tablepublic void close(SessionLocal session)
Tablepublic long getRowCount(SessionLocal session)
TablegetRowCount in class Tablesession - the sessionpublic static DbException wrapException(java.lang.String sql, java.lang.Exception ex)
sql - the SQL statementex - the exception from the remote databasepublic java.lang.String getQualifiedTable()
public java.sql.PreparedStatement execute(java.lang.String sql,
java.util.ArrayList<Value> params,
boolean reusePrepared,
SessionLocal session)
sql - the SQL statementparams - the parameters or nullreusePrepared - if the prepared statement can be re-used immediatelysession - the sessionpublic void checkSupportAlter()
TablecheckSupportAlter in class Tablepublic long truncate(SessionLocal session)
Tablepublic boolean canGetRowCount(SessionLocal session)
TablecanGetRowCount in class Tablesession - the sessionpublic boolean canDrop()
Tablepublic TableType getTableType()
TablegetTableType in class Tablepublic void removeChildrenAndResources(SessionLocal session)
DbObjectremoveChildrenAndResources in class Tablesession - the sessionpublic boolean isOracle()
public java.util.ArrayList<Index> getIndexes()
TablegetIndexes in class Tablepublic long getMaxDataModificationId()
TablegetMaxDataModificationId in class Tablepublic void updateRows(Prepared prepared, SessionLocal session, LocalResult rows)
TableupdateRows in class Tableprepared - the prepared statementsession - the sessionrows - a list of row pairs of the form old row, new row, old row,
new row,...public void setGlobalTemporary(boolean globalTemporary)
public void setReadOnly(boolean readOnly)
public long getRowCountApproximation(SessionLocal session)
TablegetRowCountApproximation in class Tablesession - the sessionpublic void reusePreparedStatement(java.sql.PreparedStatement prep,
java.lang.String sql)
prep - the prepared statementsql - the SQL statementpublic boolean isDeterministic()
TableisDeterministic in class Tablepublic void checkWritingAllowed()
checkWritingAllowed in class Tablepublic void convertInsertRow(SessionLocal session, Row row, java.lang.Boolean overridingSystem)
TableconvertInsertRow in class Tablesession - the sessionrow - the rowoverridingSystem - Boolean.TRUE for OVERRIDING SYSTEM VALUES,
Boolean.FALSE for OVERRIDING USER VALUES,
null if override clause is not specifiedpublic void convertUpdateRow(SessionLocal session, Row row, boolean fromTrigger)
TableconvertUpdateRow in class Tablesession - the sessionrow - the rowfromTrigger - true if row was modified by INSERT or UPDATE triggerpublic void setFetchSize(int fetchSize)
fetchSize - to setpublic void setAutoCommit(boolean mode)
mode - to setpublic boolean getAutocommit()
public int getFetchSize()
public java.lang.String getIdentifierQuoteString()