| org.apache.derby.iapi.sql.Statement
All known Subclasses: org.apache.derby.impl.sql.GenericStatement,
Statement | public interface Statement (Code) | | The Statement interface provides a way of giving a statement to the
language module, preparing the statement, and executing it. It also
provides some support for stored statements. Simple, non-stored,
non-parameterized statements can be executed with the execute() method.
Parameterized statements must use prepare(). To get the stored query
plan for a statement, use get().
This interface will have different implementations for the execution-only
and compile-and-execute versions of the product. In the execution-only
version, some of the methods will do nothing but raise exceptions to
indicate that they are not implemented.
There is a Statement factory in the Connection interface in the Database
module, which uses the one provided in LanguageFactory.
author: Jeff Lichtman |
getSource | String getSource()(Code) | | Return the SQL string that this statement is for.
the SQL string this statement is for. |
prepare | PreparedStatement prepare(LanguageConnectionContext lcc, boolean allowInternalSyntax) throws StandardException(Code) | | Generates an execution plan without executing it.
Parameters: lcc - the language connection context Parameters: allowInternalSyntax - If this statement is for a metadata call then we will allow internal sql syntax on such statement. This internalsql syntax is not available to a user sql statement. A PreparedStatement that allows execution of the executionplan. exception: StandardException - Thrown if this is anexecution-only version of the module (the prepare() methodrelies on compilation). |
prepareStorable | public PreparedStatement prepareStorable(LanguageConnectionContext lcc, PreparedStatement ps, Object[] paramDefaults, SchemaDescriptor spsSchema, boolean internalSQL) throws StandardException(Code) | | Generates an execution plan given a set of named parameters.
For generating a storable prepared statement (which
has some extensions over a standard prepared statement).
Parameters: lcc - Compiler state variable. Parameters: ps - Prepared statement Parameters: paramDefaults - Default parameter values to use foroptimization Parameters: spsSchema - schema of the stored prepared statement A Storable PreparedStatement that allows execution of the executionplan. exception: StandardException - Thrown if this is anexecution-only version of the module (the prepare() methodrelies on compilation). |
|
|