org.apache.derby.diag
Class StatementCache
java.lang.Object
org.apache.derby.vti.VTITemplate
org.apache.derby.diag.StatementCache
- All Implemented Interfaces:
- java.sql.ResultSet
- public final class StatementCache
- extends VTITemplate
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. True if the statement is compiled as a pure unicode string, false if it handled unicode escapes.
- 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 Cloudscape database.
This class also provides a static method to empty the statement cache, StatementCache.emptyCache()
Fields inherited from interface java.sql.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 |
Methods inherited from class org.apache.derby.vti.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, getCursorName, getDate, getDate, getDate, getDate, getDouble, getDouble, getFetchDirection, getFetchSize, getFloat, getFloat, getInt, getInt, getLong, getLong, getObject, getObject, getObject, getObject, getRef, getRef, getRow, getShort, getShort, getStatement, getString, getTime, getTime, getTime, getTime, getTimestamp, getTimestamp, getTimestamp, getType, getUnicodeStream, getUnicodeStream, getURL, getURL, getWarnings, insertRow, isAfterLast, isBeforeFirst, isFirst, isLast, last, moveToCurrentRow, moveToInsertRow, previous, refreshRow, relative, rowDeleted, rowInserted, rowUpdated, setFetchDirection, setFetchSize, updateArray, updateArray, updateAsciiStream, updateAsciiStream, updateBigDecimal, updateBigDecimal, updateBinaryStream, updateBinaryStream, updateBlob, updateBlob, updateBoolean, updateBoolean, updateByte, updateByte, updateBytes, updateBytes, updateCharacterStream, updateCharacterStream, updateClob, updateClob, updateDate, updateDate, updateDouble, updateDouble, updateFloat, updateFloat, updateInt, updateInt, updateLong, updateLong, updateNull, updateNull, updateObject, updateObject, updateObject, updateObject, updateRef, updateRef, updateRow, updateShort, updateShort, updateString, updateString, updateTime, updateTime, updateTimestamp, updateTimestamp |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
position
private int position
data
private java.util.Vector data
currentPs
private GenericPreparedStatement currentPs
wasNull
private boolean wasNull
columnInfo
private static final ResultColumnDescriptor[] columnInfo
metadata
private static final java.sql.ResultSetMetaData metadata
StatementCache
public StatementCache()
throws java.sql.SQLException
emptyCache
public static void emptyCache()
throws java.sql.SQLException
- Empty the statement cache. Must be called from a SQL statement, e.g.
CALL org.apache.derby.diag.StatementCache::emptyCache()
- Throws:
java.sql.SQLException
next
public boolean next()
close
public void close()
getString
public java.lang.String getString(int colId)
- Specified by:
getString
in interface java.sql.ResultSet
- Overrides:
getString
in class VTITemplate
- See Also:
ResultSet
getBoolean
public boolean getBoolean(int colId)
- Specified by:
getBoolean
in interface java.sql.ResultSet
- Overrides:
getBoolean
in class VTITemplate
- See Also:
ResultSet
getTimestamp
public java.sql.Timestamp getTimestamp(int colId)
- Specified by:
getTimestamp
in interface java.sql.ResultSet
- Overrides:
getTimestamp
in class VTITemplate
- See Also:
ResultSet
wasNull
public boolean wasNull()
- Specified by:
wasNull
in interface java.sql.ResultSet
- Overrides:
wasNull
in class VTITemplate
- See Also:
ResultSet
getMetaData
public java.sql.ResultSetMetaData getMetaData()
Apache Derby V10.1 Engine Documentation - Copyright © 1997,2005 The Apache Software Foundation or its licensors, as applicable.