GenericStatementpublic interface Statement
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.
| Modifier and Type | Method | Description |
|---|---|---|
java.lang.String |
getSource() |
Return the SQL string that this statement is for.
|
PreparedStatement |
prepare(LanguageConnectionContext lcc) |
Generates an execution plan without executing it.
|
PreparedStatement |
prepare(LanguageConnectionContext lcc,
boolean allowInternalSyntax) |
Generates an execution plan without executing it.
|
PreparedStatement |
prepareStorable(LanguageConnectionContext lcc,
PreparedStatement ps,
java.lang.Object[] paramDefaults,
SchemaDescriptor spsSchema,
boolean internalSQL) |
Generates an execution plan given a set of named parameters.
|
PreparedStatement prepare(LanguageConnectionContext lcc) throws StandardException
StandardException - Thrown if this is an
execution-only version of the module (the prepare() method
relies on compilation).PreparedStatement prepare(LanguageConnectionContext lcc, boolean allowInternalSyntax) throws StandardException
lcc - the language connection contextallowInternalSyntax - If this statement is for a metadata call then
we will allow internal sql syntax on such statement. This internal
sql syntax is not available to a user sql statement.StandardException - Thrown if this is an
execution-only version of the module (the prepare() method
relies on compilation).PreparedStatement prepareStorable(LanguageConnectionContext lcc, PreparedStatement ps, java.lang.Object[] paramDefaults, SchemaDescriptor spsSchema, boolean internalSQL) throws StandardException
lcc - Compiler state variable.ps - Prepared statementparamDefaults - Default parameter values to use for
optimizationspsSchema - schema of the stored prepared statementStandardException - Thrown if this is an
execution-only version of the module (the prepare() method
relies on compilation).java.lang.String getSource()
Apache Derby V10.14 Internals - Copyright © 2004,2018 The Apache Software Foundation. All Rights Reserved.