Class StatementCache
java.lang.Object
org.apache.derby.vti.VTITemplate
org.apache.derby.diag.StatementCache
- All Implemented Interfaces:
AutoCloseable, ResultSet, Wrapper, AwareVTI
StatementCache is a virtual table that shows the contents of the SQL statement cache.
This virtual table can be invoked by calling it directly.
select * from new org.apache.derby.diag.StatementCache() t
The StatementCache virtual table has the following columns:
- ID CHAR(36) - not nullable. Internal identifier of the compiled statement.
- SCHEMANAME VARCHAR(128) - nullable. Schema the statement was compiled in.
- SQL_TEXT VARCHAR(32672) - not nullable. Text of the statement
- UNICODE BIT/BOOLEAN - not nullable. Always true.
- VALID BIT/BOOLEAN - not nullable. True if the statement is currently valid, false otherwise
- COMPILED_AT TIMESTAMP nullable - time statement was compiled, requires STATISTICS TIMING to be enabled.
The internal identifier of a cached statement matches the toString() method of a PreparedStatement object for a Derby database.
This class also provides a static method to empty the statement cache, StatementCache.emptyCache()
-
Nested Class Summary
Nested classes/interfaces inherited from class VTITemplate
VTITemplate.ColumnDescriptor -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final ResultColumnDescriptor[]private GenericPreparedStatementprivate Vector<GenericPreparedStatement> private static final ResultSetMetaDataprivate intprivate booleanFields inherited from interface ResultSet
CLOSE_CURSORS_AT_COMMIT, CONCUR_READ_ONLY, CONCUR_UPDATABLE, FETCH_FORWARD, FETCH_REVERSE, FETCH_UNKNOWN, HOLD_CURSORS_OVER_COMMIT, TYPE_FORWARD_ONLY, TYPE_SCROLL_INSENSITIVE, TYPE_SCROLL_SENSITIVE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()booleangetBoolean(int colId) private static ContextgetContextOrNull(String contextID) Privileged lookup of a Context.getString(int colId) getTimestamp(int colId) booleannext()booleanwasNull()Methods inherited from class VTITemplate
absolute, afterLast, beforeFirst, cancelRowUpdates, clearWarnings, deleteRow, findColumn, first, getArray, getArray, getAsciiStream, getAsciiStream, getBigDecimal, getBigDecimal, getBigDecimal, getBigDecimal, getBinaryStream, getBinaryStream, getBlob, getBlob, getBoolean, getByte, getByte, getBytes, getBytes, getCharacterStream, getCharacterStream, getClob, getClob, getConcurrency, getContext, getCursorName, getDate, getDate, getDate, getDate, getDouble, getDouble, getFetchDirection, getFetchSize, getFloat, getFloat, getHoldability, getInt, getInt, getLong, getLong, getNCharacterStream, getNCharacterStream, getNClob, getNClob, getNString, getNString, getObject, getObject, getObject, getObject, getObject, getObject, getRef, getRef, getReturnTableSignature, getRow, getRowId, getRowId, getShort, getShort, getSQLXML, getSQLXML, getStatement, getString, getTime, getTime, getTime, getTime, getTimestamp, getTimestamp, getTimestamp, getType, getUnicodeStream, getUnicodeStream, getURL, getURL, getWarnings, insertRow, isAfterLast, isBeforeFirst, isClosed, isFirst, isLast, isWrapperFor, last, moveToCurrentRow, moveToInsertRow, notImplemented, previous, refreshRow, relative, rowDeleted, rowInserted, rowUpdated, setContext, setFetchDirection, setFetchSize, unwrap, updateArray, updateArray, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateBigDecimal, updateBigDecimal, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBlob, updateBlob, updateBlob, updateBlob, updateBlob, updateBlob, updateBoolean, updateBoolean, updateByte, updateByte, updateBytes, updateBytes, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateClob, updateClob, updateClob, updateClob, updateClob, updateClob, updateDate, updateDate, updateDouble, updateDouble, updateFloat, updateFloat, updateInt, updateInt, updateLong, updateLong, updateNCharacterStream, updateNCharacterStream, updateNCharacterStream, updateNCharacterStream, updateNClob, updateNClob, updateNClob, updateNClob, updateNClob, updateNClob, updateNString, updateNString, updateNull, updateNull, updateObject, updateObject, updateObject, updateObject, updateRef, updateRef, updateRow, updateRowId, updateRowId, updateShort, updateShort, updateSQLXML, updateSQLXML, updateString, updateString, updateTime, updateTime, updateTimestamp, updateTimestampMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ResultSet
updateObject, updateObject, updateObject, updateObject
-
Field Details
-
position
private int position -
data
-
currentPs
-
wasNull
private boolean wasNull -
columnInfo
-
metadata
-
-
Constructor Details
-
StatementCache
- Throws:
StandardException
-
-
Method Details
-
next
public boolean next() -
close
public void close() -
getString
- Specified by:
getStringin interfaceResultSet- Overrides:
getStringin classVTITemplate
-
getBoolean
public boolean getBoolean(int colId) - Specified by:
getBooleanin interfaceResultSet- Overrides:
getBooleanin classVTITemplate
-
getTimestamp
- Specified by:
getTimestampin interfaceResultSet- Overrides:
getTimestampin classVTITemplate
-
wasNull
public boolean wasNull()- Specified by:
wasNullin interfaceResultSet- Overrides:
wasNullin classVTITemplate
-
getMetaData
- Specified by:
getMetaDatain interfaceResultSet- Overrides:
getMetaDatain classVTITemplate
-
getContextOrNull
-