|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PreparedStatement
The PreparedStatement interface provides methods to execute prepared statements, store them, and get metadata about them.
Field Summary |
---|
Fields inherited from interface org.apache.derby.catalog.Dependable |
---|
ACTIVATION, ALIAS, COLUMNS_IN_TABLE, COLUMNS_PERMISSION, CONGLOMERATE, CONSTRAINT, DEFAULT, FILE, HEAP, INDEX, PERM, PREPARED_STATEMENT, ROLE_GRANT, ROUTINE_PERMISSION, SCHEMA, SEQUENCE, STORED_PREPARED_STATEMENT, TABLE, TABLE_PERMISSION, TRIGGER, VIEW |
Method Summary | |
---|---|
ResultSet |
execute(Activation activation,
long timeoutMillis)
Execute the PreparedStatement and return results, used for top level statements (not substatements) in a connection. |
ResultSet |
executeSubStatement(Activation parent,
Activation activation,
boolean rollbackParentContext,
long timeoutMillis)
Execute a statement as part of another statement (ithout a nested connection) and return results. |
ResultSet |
executeSubStatement(LanguageConnectionContext lcc,
boolean rollbackParentContext,
long timeoutMillis)
Execute a statement as part of another statement (without a nested connection) and return results. |
Activation |
getActivation(LanguageConnectionContext lcc,
boolean scrollable)
PreparedStatements are re-entrant - that is, more than one execution can be active at a time for a single prepared statement. |
java.sql.Timestamp |
getBeginCompileTimestamp()
Get the timestamp for the beginning of compilation |
long |
getBindTimeInMillis()
Get the bind time for the associated query in milliseconds. |
long |
getCompileTimeInMillis()
Get the total compile time for the associated query in milliseconds. |
java.sql.SQLWarning |
getCompileTimeWarnings()
Return any compile time warnings. |
java.sql.Timestamp |
getEndCompileTimestamp()
Get the timestamp for the end of compilation |
long |
getGenerateTimeInMillis()
Get the generate time for the associated query in milliseconds. |
long |
getOptimizeTimeInMillis()
Get the optimize time for the associated query in milliseconds. |
DataTypeDescriptor[] |
getParameterTypes()
Get an array of DataTypeDescriptors describing the types of the parameters of this PreparedStatement. |
long |
getParseTimeInMillis()
Get the parse time for the associated query in milliseconds. |
ResultDescription |
getResultDescription()
Get the ResultDescription for the statement. |
java.lang.String |
getSource()
Return the SQL string that this statement is for. |
java.lang.String |
getSPSName()
Return the SPS Name for this statement. |
boolean |
isAtomic()
Returns whether or not this Statement requires should behave atomically -- i.e. whether a user is permitted to do a commit/rollback during the execution of this statement. |
boolean |
referencesSessionSchema()
Return true if the query node for this statement references SESSION schema tables. |
void |
rePrepare(LanguageConnectionContext lcc)
Re-prepare the statement if it is not up to date or, if requested, simply not optimal. |
boolean |
upToDate()
Checks whether this PreparedStatement is up to date. |
Methods inherited from interface org.apache.derby.iapi.sql.depend.Dependent |
---|
isValid, makeInvalid, prepareToInvalidate |
Methods inherited from interface org.apache.derby.catalog.Dependable |
---|
getClassType, getDependableFinder, getObjectID, getObjectName, isPersistent |
Method Detail |
---|
boolean upToDate() throws StandardException
StandardException
void rePrepare(LanguageConnectionContext lcc) throws StandardException
lcc
- The LanguageConnectionContext.
StandardException
- thrown if unable to performActivation getActivation(LanguageConnectionContext lcc, boolean scrollable) throws StandardException
lcc
- The LanguageConnectionContext.
StandardException
- Thrown on failureResultSet execute(Activation activation, long timeoutMillis) throws StandardException
There is no executeQuery() or executeUpdate(); a method is provided in ResultSet to tell whether to expect rows to be returned.
activation
- The activation containing all the local state
to execute the plan.timeoutMillis
- timeout value in milliseconds.
StandardException
- Thrown on failureResultSet executeSubStatement(Activation parent, Activation activation, boolean rollbackParentContext, long timeoutMillis) throws StandardException
There is no executeQuery() or executeUpdate(); a method is provided in ResultSet to tell whether to expect rows to be returned.
parent
- The activation of the superstatementactivation
- The activation containing all the local state
to execute the plan for substatementrollbackParentContext
- True if in the event of a statement-level
exception, the parent context needs to be rolled back, too.timeoutMillis
- timeout value in milliseconds.
StandardException
- Thrown on failureResultSet executeSubStatement(LanguageConnectionContext lcc, boolean rollbackParentContext, long timeoutMillis) throws StandardException
Creates a new single use activation and executes it, but also passes rollbackParentContext parameter.
lcc
- language connection contextrollbackParentContext
- True if in the event of a statement-level
exception, the parent context needs to be rolled back, too.timeoutMillis
- timeout value in milliseconds.
StandardException
executeSubStatement(Activation, Activation, boolean, long)
ResultDescription getResultDescription()
This is available here and on the ResultSet so that users can see the shape of the result before they execute.
boolean referencesSessionSchema()
DataTypeDescriptor[] getParameterTypes()
java.lang.String getSource()
java.lang.String getSPSName()
long getCompileTimeInMillis()
long getParseTimeInMillis()
long getBindTimeInMillis()
long getOptimizeTimeInMillis()
long getGenerateTimeInMillis()
java.sql.Timestamp getBeginCompileTimestamp()
java.sql.Timestamp getEndCompileTimestamp()
boolean isAtomic()
java.sql.SQLWarning getCompileTimeWarnings()
|
Built on Thu 2010-12-23 20:49:13+0000, from revision ??? | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |