Dependable
, Dependent
ExecPreparedStatement
, StorablePreparedStatement
GenericPreparedStatement
, GenericStorablePreparedStatement
public interface PreparedStatement extends Dependent
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
Modifier and Type | Method | Description |
---|---|---|
ResultSet |
execute(Activation activation,
boolean forMetaData,
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 |
getParameterType(int idx) |
Get the type of the parameter at the given (0-based) index.
|
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.
|
long |
getVersionCounter() |
Get the version counter.
|
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.
|
getClassType, getDependableFinder, getObjectID, getObjectName, isPersistent
isValid, makeInvalid, prepareToInvalidate
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, boolean forMetaData, 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.forMetaData
- true if this is a meta-data querytimeoutMillis
- 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()
DataTypeDescriptor getParameterType(int idx) throws StandardException
StandardException
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()
long getVersionCounter()
Apache Derby V10.14 Internals - Copyright © 2004,2018 The Apache Software Foundation. All Rights Reserved.