org.apache.derby.diag
Class StatementCache

java.lang.Object
  extended byorg.apache.derby.vti.VTITemplate
      extended byorg.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:

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()


Field Summary
private static ResultColumnDescriptor[] columnInfo
           
private  GenericPreparedStatement currentPs
           
private  java.util.Vector data
           
private static java.sql.ResultSetMetaData metadata
           
private  int position
           
private  boolean wasNull
           
 
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
 
Constructor Summary
StatementCache()
           
 
Method Summary
 void close()
           
static void emptyCache()
          Empty the statement cache.
 boolean getBoolean(int colId)
           
 java.sql.ResultSetMetaData getMetaData()
           
 java.lang.String getString(int colId)
           
 java.sql.Timestamp getTimestamp(int colId)
           
 boolean next()
           
 boolean wasNull()
           
 
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
 

Field Detail

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
Constructor Detail

StatementCache

public StatementCache()
               throws java.sql.SQLException
Method Detail

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.0 Engine Documentation - Copyright © 1997,2004 The Apache Software Foundation or its licensors, as applicable.