TableLink

A linked table contains connection information for a table accessible by JDBC. The table may be stored in a different database.

Methods
static DbException wrapException(String sql, Exception ex)
Wrap a SQL exception that occurred while accessing a linked table.
static DbException wrapException(String sql, Exception ex)
Wrap a SQL exception that occurred while accessing a linked table.
Parameters:
sql - the SQL statement
ex - the exception from the remote database
Returns:
the wrapped exception
Index addIndex(Session session, String indexName, int indexId, IndexColumn[] cols, IndexType indexType, boolean create, String indexComment)
Index addIndex(Session session, String indexName, int indexId, IndexColumn[] cols, IndexType indexType, boolean create, String indexComment)
void addRow(Session session, Row row)
void addRow(Session session, Row row)
boolean canDrop()
boolean canDrop()
boolean canGetRowCount()
boolean canGetRowCount()
void checkRename()
void checkRename()
void checkSupportAlter()
void checkSupportAlter()
void checkWritingAllowed()
Linked tables don't know if they are readonly.
void checkWritingAllowed()
Linked tables don't know if they are readonly. This overwrites the default handling.
void close(Session session)
void close(Session session)
PreparedStatement execute(String sql, ArrayList params, boolean reusePrepared)
Execute a SQL statement using the given parameters.
PreparedStatement execute(String sql, ArrayList params, boolean reusePrepared)
Execute a SQL statement using the given parameters. Prepared statements are kept in a hash map to avoid re-creating them.
Parameters:
sql - the SQL statement
params - the parameters or null
reusePrepared - if the prepared statement can be re-used immediately
Returns:
the prepared statement, or null if it is re-used
String getCreateSQL()
String getCreateSQL()
Value getDefaultValue(Session session, Column column)
Get or generate a default value for the given column.
Value getDefaultValue(Session session, Column column)
Get or generate a default value for the given column. Default values are not set (kept as null).
Parameters:
session - the session
column - the column
Returns:
the value
long getDiskSpaceUsed()
long getDiskSpaceUsed()
String getDropSQL()
String getDropSQL()
ArrayList getIndexes()
ArrayList getIndexes()
long getMaxDataModificationId()
long getMaxDataModificationId()
String getQualifiedTable()
String getQualifiedTable()
long getRowCount(Session session)
long getRowCount(Session session)
long getRowCountApproximation()
long getRowCountApproximation()
Index getScanIndex(Session session)
Index getScanIndex(Session session)
TableType getTableType()
TableType getTableType()
Index getUniqueIndex()
Index getUniqueIndex()
boolean isDeterministic()
boolean isDeterministic()
boolean isLockedExclusively()
boolean isLockedExclusively()
boolean isOracle()
boolean isOracle()
boolean lock(Session session, boolean exclusive, boolean forceLockEvenInMvcc)
boolean lock(Session session, boolean exclusive, boolean forceLockEvenInMvcc)
void removeChildrenAndResources(Session session)
void removeChildrenAndResources(Session session)
void removeRow(Session session, Row row)
void removeRow(Session session, Row row)
void reusePreparedStatement(PreparedStatement prep, String sql)
Add this prepared statement to the list of cached statements.
void reusePreparedStatement(PreparedStatement prep, String sql)
Add this prepared statement to the list of cached statements.
Parameters:
prep - the prepared statement
sql - the SQL statement
void setGlobalTemporary(boolean globalTemporary)
void setGlobalTemporary(boolean globalTemporary)
void setReadOnly(boolean readOnly)
void setReadOnly(boolean readOnly)
void truncate(Session session)
void truncate(Session session)
void unlock(Session s)
void unlock(Session s)
void updateRows(Prepared prepared, Session session, RowList rows)
void updateRows(Prepared prepared, Session session, RowList rows)
void validateConvertUpdateSequence(Session session, Row row)
Convert the values if required.
void validateConvertUpdateSequence(Session session, Row row)
Convert the values if required. Default values are not set (kept as null).
Parameters:
session - the session
row - the row