org.apache.derby.diag
Class StatementCache

java.lang.Object
  extended by org.apache.derby.vti.VTITemplate
      extended by org.apache.derby.diag.StatementCache
All Implemented Interfaces:
java.sql.ResultSet, java.sql.Wrapper

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 Derby 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()
           
 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
 
Methods inherited from interface java.sql.ResultSet
getHoldability, getNCharacterStream, getNCharacterStream, getNClob, getNClob, getNString, getNString, getRowId, getRowId, getSQLXML, getSQLXML, isClosed, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBlob, updateBlob, updateBlob, updateBlob, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateClob, updateClob, updateClob, updateClob, updateNCharacterStream, updateNCharacterStream, updateNCharacterStream, updateNCharacterStream, updateNClob, updateNClob, updateNClob, updateNClob, updateNClob, updateNClob, updateNString, updateNString, updateRowId, updateRowId, updateSQLXML, updateSQLXML
 
Methods inherited from interface java.sql.Wrapper
isWrapperFor, unwrap
 

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
Throws:
java.sql.SQLException
Method Detail

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

Built on Thu 2011-03-10 11:54:14+0000, from revision ???

Apache Derby V10.6 Internals - Copyright © 2004,2007 The Apache Software Foundation. All Rights Reserved.