|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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 |
ALIAS, COLUMNS_IN_TABLE, CONGLOMERATE, CONSTRAINT, DEFAULT, FILE, HEAP, INDEX, PREPARED_STATEMENT, SCHEMA, STORED_PREPARED_STATEMENT, TABLE, TRIGGER, VIEW |
Method Summary | |
ResultSet |
execute(Activation activation,
boolean executeQuery,
boolean executeUpdate,
boolean rollbackParentContext)
Execute the PreparedStatement and return results. |
ResultSet |
execute(LanguageConnectionContext lcc,
boolean rollbackParentContext)
Simple form of execute(). |
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, makeValid, prepareToInvalidate |
Methods inherited from interface org.apache.derby.catalog.Dependable |
getClassType, getDependableFinder, getObjectID, getObjectName, isPersistent |
Method Detail |
public boolean upToDate() throws StandardException
StandardException
public void rePrepare(LanguageConnectionContext lcc) throws StandardException
lcc
- The LanguageConnectionContext.
StandardException
- thrown if unable to performpublic Activation getActivation(LanguageConnectionContext lcc, boolean scrollable) throws StandardException
lcc
- The LanguageConnectionContext.
StandardException
- Thrown on failurepublic ResultSet execute(Activation activation, boolean executeQuery, boolean executeUpdate, boolean rollbackParentContext) 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.executeQuery
- Whether or not called from a Statement.executeQuery()executeUpdate
- Whether or not called from a Statement.executeUpdate()rollbackParentContext
- True if 1) the statement context is
NOT a top-level context, AND 2) in the event of a statement-level
exception, the parent context needs to be rolled back, too.
StandardException
- Thrown on failurepublic ResultSet execute(LanguageConnectionContext lcc, boolean rollbackParentContext) throws StandardException
StandardException
public ResultDescription getResultDescription()
This is available here and on the ResultSet so that users can see the shape of the result before they execute.
public boolean referencesSessionSchema()
public DataTypeDescriptor[] getParameterTypes()
public java.lang.String getSource()
public java.lang.String getSPSName()
public long getCompileTimeInMillis()
public long getParseTimeInMillis()
public long getBindTimeInMillis()
public long getOptimizeTimeInMillis()
public long getGenerateTimeInMillis()
public java.sql.Timestamp getBeginCompileTimestamp()
public java.sql.Timestamp getEndCompileTimestamp()
public boolean isAtomic()
public java.sql.SQLWarning getCompileTimeWarnings()
|
Built on Tue 2006-10-10 19:23:47+0200, from revision exported | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |