|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.derby.impl.sql.compile.QueryTreeNode
org.apache.derby.impl.sql.compile.StatementNode
org.apache.derby.impl.sql.compile.DMLStatementNode
abstract class DMLStatementNode
A DMLStatementNode represents any type of DML statement: a cursor declaration, an INSERT statement, and UPDATE statement, or a DELETE statement. All DML statements have result sets, but they do different things with them. A SELECT statement sends its result set to the client, an INSERT statement inserts its result set into a table, a DELETE statement deletes from a table the rows corresponding to the rows in its result set, and an UPDATE statement updates the rows in a base table corresponding to the rows in its result set.
Field Summary | |
---|---|
(package private) ResultSetNode |
resultSet
The result set is the rows that result from running the statement. |
Fields inherited from class org.apache.derby.impl.sql.compile.StatementNode |
---|
NEED_CURSOR_ACTIVATION, NEED_DDL_ACTIVATION, NEED_NOTHING_ACTIVATION, NEED_PARAM_ACTIVATION, NEED_ROW_ACTIVATION |
Fields inherited from class org.apache.derby.impl.sql.compile.QueryTreeNode |
---|
AUTOINCREMENT_CREATE_MODIFY, AUTOINCREMENT_INC_INDEX, AUTOINCREMENT_IS_AUTOINCREMENT_INDEX, AUTOINCREMENT_START_INDEX, isPrivilegeCollectionRequired |
Constructor Summary | |
---|---|
DMLStatementNode()
|
Method Summary | |
---|---|
(package private) void |
acceptChildren(Visitor v)
Accept the visitor for all visitable children of this node. |
(package private) int |
activationKind()
Returns the type of activation this class generates. |
(package private) QueryTreeNode |
bind(DataDictionary dataDictionary)
Bind this DMLStatementNode. |
protected void |
bindExpressions()
Bind the expressions in this DML statement. |
protected void |
bindExpressionsWithTables()
Bind the expressions in the underlying ResultSets with tables. |
QueryTreeNode |
bindResultSetsWithTables(DataDictionary dataDictionary)
Bind only the underlying ResultSets with tables. |
protected void |
bindTables(DataDictionary dataDictionary)
Bind the tables in this DML statement. |
(package private) void |
generateParameterValueSet(ActivationClassBuilder acb)
Generate the code to create the ParameterValueSet, if necessary, when constructing the activation. |
(package private) int |
getPrivType()
Return default privilege needed for this node. |
ResultSetNode |
getResultSetNode()
Get the ResultSetNode from this DML Statement. |
void |
init(java.lang.Object resultSet)
Initializer for a DMLStatementNode |
boolean |
isAtomic()
A read statement is atomic (DMLMod overrides us) if there are no work units, and no SELECT nodes, or if its SELECT nodes are all arguments to a function. |
ResultDescription |
makeResultDescription()
Make a ResultDescription for use in a PreparedStatement. |
void |
optimizeStatement()
Optimize a DML statement (which is the only type of statement that should need optimizing, I think). |
void |
printSubNodes(int depth)
Prints the sub-nodes of this object. |
Methods inherited from class org.apache.derby.impl.sql.compile.StatementNode |
---|
bindStatement, executeSchemaName, executeStatementName, generate, getSPSName, lockTableForCompilation, needsSavepoint, statementToString, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
ResultSetNode resultSet
Constructor Detail |
---|
DMLStatementNode()
Method Detail |
---|
public void init(java.lang.Object resultSet)
init
in class QueryTreeNode
resultSet
- A ResultSetNode for the result set of the
DML statementpublic void printSubNodes(int depth)
printSubNodes
in class QueryTreeNode
depth
- The depth of this node in the treepublic ResultSetNode getResultSetNode()
QueryTreeNode bind(DataDictionary dataDictionary) throws StandardException
dataDictionary
- The DataDictionary to use to look up
columns, tables, etc.
StandardException
- Thrown on errorpublic QueryTreeNode bindResultSetsWithTables(DataDictionary dataDictionary) throws StandardException
dataDictionary
- The DataDictionary to use to look up
columns, tables, etc.
StandardException
- Thrown on errorprotected void bindTables(DataDictionary dataDictionary) throws StandardException
dataDictionary
- The data dictionary to use to look up the tables
StandardException
- Thrown on errorprotected void bindExpressions() throws StandardException
StandardException
- Thrown on errorprotected void bindExpressionsWithTables() throws StandardException
StandardException
- Thrown on errorint activationKind()
activationKind
in class StatementNode
public void optimizeStatement() throws StandardException
optimizeStatement
in class StatementNode
StandardException
- Thrown on errorpublic ResultDescription makeResultDescription()
makeResultDescription
in class StatementNode
void generateParameterValueSet(ActivationClassBuilder acb) throws StandardException
acb
- The ActivationClassBuilder for the class we're building
StandardException
public boolean isAtomic() throws StandardException
VALUES myfunc(SELECT max(c.commitFunc()) FROM T)but we aren't going too far out of our way to catch every possible wierd case. We basically want to be permissive w/o allowing someone to partially commit a write.
isAtomic
in class StatementNode
StandardException
- on errorvoid acceptChildren(Visitor v) throws StandardException
acceptChildren
in class QueryTreeNode
v
- the visitor
StandardException
- on errorint getPrivType()
|
Built on Thu 2012-03-29 21:53:33+0000, from revision ??? | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |