Modifier and Type | Field | Description |
---|---|---|
private SchemaDescriptor |
compilationSchema |
|
private boolean |
isForReadOnly |
|
private GenericPreparedStatement |
preparedStmt |
|
private int |
prepareIsolationLevel |
|
private java.lang.String |
statementText |
Constructor | Description |
---|---|
GenericStatement(SchemaDescriptor compilationSchema,
java.lang.String statementText,
boolean isForReadOnly) |
Constructor for a Statement given the text of the statement in a String
|
Modifier and Type | Method | Description |
---|---|---|
boolean |
equals(java.lang.Object other) |
|
java.lang.String |
getCompilationSchema() |
|
private static long |
getCurrentTimeMillis(LanguageConnectionContext lcc) |
|
PreparedStatement |
getPreparedStatement() |
Return the
PreparedStatement currently associated with this
statement. |
java.lang.String |
getSource() |
Return the SQL string that this statement is for.
|
int |
hashCode() |
|
PreparedStatement |
prepare(LanguageConnectionContext lcc) |
Generates an execution plan without executing it.
|
PreparedStatement |
prepare(LanguageConnectionContext lcc,
boolean forMetaData) |
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.
|
private PreparedStatement |
prepMinion(LanguageConnectionContext lcc,
boolean cacheMe,
java.lang.Object[] paramDefaults,
SchemaDescriptor spsSchema,
boolean internalSQL) |
|
private void |
walkAST(LanguageConnectionContext lcc,
Visitable queryTree,
int phase) |
Walk the AST, using a (user-supplied) Visitor
|
private final SchemaDescriptor compilationSchema
private final java.lang.String statementText
private final boolean isForReadOnly
private int prepareIsolationLevel
private GenericPreparedStatement preparedStmt
public GenericStatement(SchemaDescriptor compilationSchema, java.lang.String statementText, boolean isForReadOnly)
compilationSchema
- schemastatementText
- The text of the statementisForReadOnly
- if the statement is opened with level CONCUR_READ_ONLYpublic PreparedStatement prepare(LanguageConnectionContext lcc) throws StandardException
Statement
prepare
in interface Statement
StandardException
- Thrown if this is an
execution-only version of the module (the prepare() method
relies on compilation).public PreparedStatement prepare(LanguageConnectionContext lcc, boolean forMetaData) throws StandardException
Statement
prepare
in interface Statement
lcc
- the language connection contextforMetaData
- 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).private PreparedStatement prepMinion(LanguageConnectionContext lcc, boolean cacheMe, java.lang.Object[] paramDefaults, SchemaDescriptor spsSchema, boolean internalSQL) throws StandardException
StandardException
private void walkAST(LanguageConnectionContext lcc, Visitable queryTree, int phase) throws StandardException
StandardException
public PreparedStatement prepareStorable(LanguageConnectionContext lcc, PreparedStatement ps, java.lang.Object[] paramDefaults, SchemaDescriptor spsSchema, boolean internalSQL) throws StandardException
prepareStorable
in interface Statement
paramDefaults
- Parameter defaultslcc
- Compiler state variable.ps
- Prepared statementspsSchema
- schema of the stored prepared statementStandardException
- Thrown if this is an
execution-only version of the module (the prepare() method
relies on compilation).public java.lang.String getSource()
Statement
public java.lang.String getCompilationSchema()
private static long getCurrentTimeMillis(LanguageConnectionContext lcc)
public PreparedStatement getPreparedStatement()
PreparedStatement
currently associated with this
statement.public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
Apache Derby V10.14 Internals - Copyright © 2004,2018 The Apache Software Foundation. All Rights Reserved.