| Modifier and Type | Method and Description |
|---|---|
| public ResultSet | Returns: A ResultSet for a statement. A ResultSet represents the results returned from the statement, if any. Will return NULL if the plan for the PreparedStatement has aged out of cache, or the plan is out of date.The activation containing all the local state
to execute the plan. activation, boolean true if this is a meta-data query forMetaData, long timeout value in milliseconds. timeoutMillis)Execute the PreparedStatement and return results, used for top level statements (not substatements) in a connection. |
| public ResultSet | Returns: A ResultSet for a statement. A ResultSet represents the results returned from the statement, if any. Will return NULL if the plan for the PreparedStatement has aged out of cache, or the plan is out of date.The activation of the superstatement parent, Activation The activation containing all the local state
to execute the plan for substatement activation, boolean True if in the event of a statement-level
exception, the parent context needs to be rolled back, too. rollbackParentContext, long timeout value in milliseconds. timeoutMillis)Execute a statement as part of another statement (ithout a nested connection) and return results. |
| public ResultSet | Returns: a result set for the statementlanguage connection context lcc, boolean True if in the event of a statement-level
exception, the parent context needs to be rolled back, too. rollbackParentContext, long timeout value in milliseconds. timeoutMillis)Execute a statement as part of another statement (without a nested connection) and return results. |
| public Activation | Returns: The new activation.The LanguageConnectionContext. lcc, boolean Scrollability scrollable)PreparedStatements are re-entrant - that is, more than one execution can be active at a time for a single prepared statement. |
| public Timestamp | Returns: Timestamp The timestamp for the beginning of compilation.Get the timestamp for the beginning of compilation |
| public long | Returns: long The bind time for the associated query in milliseconds.Get the bind time for the associated query in milliseconds. |
| public long | Returns: long The total compile time for the associated query in milliseconds.Get the total compile time for the associated query in milliseconds. |
| public SQLWarning | |
| public Timestamp | Returns: Timestamp The timestamp for the end of compilation.Get the timestamp for the end of compilation |
| public long | Returns: long The generate time for the associated query in milliseconds.Get the generate time for the associated query in milliseconds. |
| public long | Returns: long The optimize time for the associated query in milliseconds.Get the optimize time for the associated query in milliseconds. |
| public DataTypeDescriptor | Returns: the parameter typeThe 0-based index of the parameter idx)Get the type of the parameter at the given (0-based) index. |
| public DataTypeDescriptor[] | Returns: An array of DataTypeDescriptors telling the type, length, precision, scale, etc. of each parameter of this PreparedStatement.Get an array of DataTypeDescriptors describing the types of the parameters of this PreparedStatement. |
| public long | Returns: long The parse time for the associated query in milliseconds.Get the parse time for the associated query in milliseconds. |
| public ResultDescription | Returns: A ResultDescription describing the results.Get the ResultDescription for the statement. |
| public String | Returns: the SQL string this statement is for.Return the SQL string that this statement is for. |
| public String | |
| public long | |
| public boolean | Returns: boolean Whether or not this Statement is atomicReturns 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. |
| public boolean | Returns: true if references SESSION schema tables, else falseReturn true if the query node for this statement references SESSION schema tables. |
| public void | rePrepare(LanguageConnectionContext
The LanguageConnectionContext. lcc)Re-prepare the statement if it is not up to date or, if requested, simply not optimal. |
| public boolean | Returns: TRUE if the PreparedStatement is up to date, FALSE if it is not up to dateChecks whether this PreparedStatement is up to date. |
| execute | back to summary |
|---|---|
| public ResultSet execute(Activation activation, boolean forMetaData, long timeoutMillis) throws StandardException Execute the PreparedStatement and return results, used for top level statements (not substatements) in a connection. There is no executeQuery() or executeUpdate(); a method is provided in ResultSet to tell whether to expect rows to be returned.
| |
| executeSubStatement | back to summary |
|---|---|
| public ResultSet executeSubStatement(Activation parent, Activation activation, boolean rollbackParentContext, long timeoutMillis) throws StandardException Execute a statement as part of another statement (ithout a nested connection) and return results. There is no executeQuery() or executeUpdate(); a method is provided in ResultSet to tell whether to expect rows to be returned.
| |
| executeSubStatement | back to summary |
|---|---|
| public ResultSet executeSubStatement(LanguageConnectionContext lcc, boolean rollbackParentContext, long timeoutMillis) throws StandardException Execute a statement as part of another statement (without a nested connection) and return results. Creates a new single use activation and executes it, but also passes rollbackParentContext parameter.
| |
| getActivation | back to summary |
|---|---|
| public Activation getActivation(LanguageConnectionContext lcc, boolean scrollable) throws StandardException PreparedStatements are re-entrant - that is, more than one execution can be active at a time for a single prepared statement. An Activation contains all the local state information to execute a prepared statement (as opposed to the constant information, such as literal values and code). Each Activation class contains the code specific to the prepared statement represented by an instance of this class (PreparedStatement).
| |
| getBeginCompileTimestamp | back to summary |
|---|---|
| public Timestamp getBeginCompileTimestamp() Get the timestamp for the beginning of compilation
| |
| getBindTimeInMillis | back to summary |
|---|---|
| public long getBindTimeInMillis() Get the bind time for the associated query in milliseconds.
| |
| getCompileTimeInMillis | back to summary |
|---|---|
| public long getCompileTimeInMillis() Get the total compile time for the associated query in milliseconds. Compile time can be divided into parse, bind, optimize and generate times.
| |
| getCompileTimeWarnings | back to summary |
|---|---|
| public SQLWarning getCompileTimeWarnings() Return any compile time warnings. Null if no warnings exist.
| |
| getEndCompileTimestamp | back to summary |
|---|---|
| public Timestamp getEndCompileTimestamp() Get the timestamp for the end of compilation
| |
| getGenerateTimeInMillis | back to summary |
|---|---|
| public long getGenerateTimeInMillis() Get the generate time for the associated query in milliseconds.
| |
| getOptimizeTimeInMillis | back to summary |
|---|---|
| public long getOptimizeTimeInMillis() Get the optimize time for the associated query in milliseconds.
| |
| getParameterType | back to summary |
|---|---|
| public DataTypeDescriptor getParameterType(int idx) throws StandardException Get the type of the parameter at the given (0-based) index. Raises an exception if the index is out of range.
| |
| getParameterTypes | back to summary |
|---|---|
| public DataTypeDescriptor[] getParameterTypes() Get an array of DataTypeDescriptors describing the types of the parameters of this PreparedStatement. The Nth element of the array describes the Nth parameter.
| |
| getParseTimeInMillis | back to summary |
|---|---|
| public long getParseTimeInMillis() Get the parse time for the associated query in milliseconds.
| |
| getResultDescription | back to summary |
|---|---|
| public ResultDescription getResultDescription() Get the ResultDescription for the statement. The ResultDescription describes what the results look like: what are the rows and columns? This is available here and on the ResultSet so that users can see the shape of the result before they execute.
| |
| getSource | back to summary |
|---|---|
| public String getSource() Return the SQL string that this statement is for.
| |
| getSPSName | back to summary |
|---|---|
| public String getSPSName() Return the SPS Name for this statement.
| |
| getVersionCounter | back to summary |
|---|---|
| public long getVersionCounter() Get the version counter. A change in the value indicates a recompile has happened.
| |
| isAtomic | back to summary |
|---|---|
| public 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.
| |
| referencesSessionSchema | back to summary |
|---|---|
| public boolean referencesSessionSchema() Return true if the query node for this statement references SESSION schema tables.
| |
| rePrepare | back to summary |
|---|---|
| public void rePrepare(LanguageConnectionContext lcc) throws StandardException Re-prepare the statement if it is not up to date or, if requested, simply not optimal. If there are open cursors using this prepared statement, then we will not be able to recompile the statement.
| |
| upToDate | back to summary |
|---|---|
| public boolean upToDate() throws StandardException Checks whether this PreparedStatement is up to date. A PreparedStatement can become out of date if any of several things happen: A schema used by the statement is dropped A table used by the statement is dropped A table used by the statement, or a column in such a table, is altered in one of several ways: a column is dropped, a privilege is dropped, a constraint is added or dropped, an index is dropped. A view used by the statement is dropped. In general, anything that happened since the plan was generated that might cause the plan to fail, or to generate incorrect results, will cause this method to return FALSE.
| |