|
|||||||||
| Home >> All >> org >> apache >> derby >> [ diag overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.apache.derby.diag
Class StatementCache

java.lang.Objectorg.apache.derby.vti.VTITemplate
org.apache.derby.diag.StatementCache
- All Implemented Interfaces:
- java.sql.ResultSet
- public final class StatementCache
- extends org.apache.derby.vti.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()
| Field Summary | |
private static org.apache.derby.iapi.sql.ResultColumnDescriptor[] |
columnInfo
|
private org.apache.derby.impl.sql.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()
This method closes the result set and frees any associated resources. |
static void |
emptyCache()
Empty the statement cache. |
boolean |
getBoolean(int colId)
This method returns the value of the specified column as a Java boolean. |
java.sql.ResultSetMetaData |
getMetaData()
This method returns data about the columns returned as part of the result set as a ResultSetMetaData instance. |
java.lang.String |
getString(int colId)
This method returns the value of the specified column as a Java String. |
java.sql.Timestamp |
getTimestamp(int colId)
This method returns the value of the specified column as a Java java.sql.Timestamp. |
boolean |
next()
This method advances to the next row in the result set. |
boolean |
wasNull()
This method tests whether the value of the last column that was fetched was actually a SQL NULL value. |
| 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 org.apache.derby.impl.sql.GenericPreparedStatement currentPs
wasNull
private boolean wasNull
columnInfo
private static final org.apache.derby.iapi.sql.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()
next
public boolean next()
- Description copied from interface:
java.sql.ResultSet - This method advances to the next row in the result set. Any streams
open on the current row are closed automatically.
close
public void close()
- Description copied from interface:
java.sql.ResultSet - This method closes the result set and frees any associated resources.
getString
public java.lang.String getString(int colId)
- Description copied from interface:
java.sql.ResultSet - This method returns the value of the specified column as a Java
String.
getBoolean
public boolean getBoolean(int colId)
- Description copied from interface:
java.sql.ResultSet - This method returns the value of the specified column as a Java
boolean.
getTimestamp
public java.sql.Timestamp getTimestamp(int colId)
- Description copied from interface:
java.sql.ResultSet - This method returns the value of the specified column as a Java
java.sql.Timestamp.
wasNull
public boolean wasNull()
- Description copied from interface:
java.sql.ResultSet - This method tests whether the value of the last column that was fetched
was actually a SQL NULL value.
getMetaData
public java.sql.ResultSetMetaData getMetaData()
- Description copied from interface:
java.sql.ResultSet - This method returns data about the columns returned as part of the
result set as a
ResultSetMetaDatainstance.
|
|||||||||
| Home >> All >> org >> apache >> derby >> [ diag overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC