|
||||||||||
| 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
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 | |
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_INC_INDEX, AUTOINCREMENT_IS_AUTOINCREMENT_INDEX, AUTOINCREMENT_START_INDEX, beginOffset, endOffset |
| Constructor Summary | |
DMLStatementNode()
|
|
| Method Summary | |
Visitable |
accept(Visitor v)
Accept a visitor, and call v.visit() on child nodes as necessary. |
(package private) int |
activationKind()
Returns the type of activation this class generates. |
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 |
generateParameterHolders(ActivationClassBuilder acb)
|
(package private) void |
generateParameterValueSet(ActivationClassBuilder acb)
Generate the code to create the ParameterValueSet, if necessary, when constructing the activation. |
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. |
QueryTreeNode |
optimize()
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 |
generate, lockTableForCompilation, statementToString, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public ResultSetNode resultSet
| Constructor Detail |
public DMLStatementNode()
| Method Detail |
public void init(java.lang.Object resultSet)
init in class QueryTreeNoderesultSet - A ResultSetNode for the result set of the
DML statementpublic void printSubNodes(int depth)
printSubNodes in class QueryTreeNodedepth - The depth of this node in the tree
public ResultSetNode getResultSetNode()
public QueryTreeNode bind(DataDictionary dataDictionary)
throws StandardException
dataDictionary - The DataDictionary to use to look up
columns, tables, etc.
StandardException - Thrown on error
public QueryTreeNode bindResultSetsWithTables(DataDictionary dataDictionary)
throws StandardException
dataDictionary - The DataDictionary to use to look up
columns, tables, etc.
StandardException - Thrown on error
protected void bindTables(DataDictionary dataDictionary)
throws StandardException
dataDictionary - The data dictionary to use to look up the tables
StandardException - Thrown on error
protected void bindExpressions()
throws StandardException
StandardException - Thrown on error
protected void bindExpressionsWithTables()
throws StandardException
StandardException - Thrown on errorint activationKind()
activationKind in class StatementNode
public QueryTreeNode optimize()
throws StandardException
optimize in class QueryTreeNodeStandardException - Thrown on errorpublic ResultDescription makeResultDescription()
makeResultDescription in class QueryTreeNode
void generateParameterValueSet(ActivationClassBuilder acb)
throws StandardException
acb - The ActivationClassBuilder for the class we're building
StandardException
void generateParameterHolders(ActivationClassBuilder acb)
throws StandardException
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 StatementNodeStandardException - on error
public Visitable accept(Visitor v)
throws StandardException
accept in interface Visitableaccept in class QueryTreeNodev - the visitor
StandardException - on error
|
Built on Tue 2006-10-10 19:23:47+0200, from revision exported | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||