|
||||||||||
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.ValueNode
org.apache.derby.impl.sql.compile.BinaryOperatorNode
org.apache.derby.impl.sql.compile.BinaryComparisonOperatorNode
This node is the superclass for all binary comparison operators, such as =, <>, <, etc.
Field Summary | |
private boolean |
betweenSelectivity
|
private boolean |
forQueryRewrite
|
Fields inherited from class org.apache.derby.impl.sql.compile.BinaryOperatorNode |
AND, BinaryArgTypes, BinaryMethodNames, BinaryOperators, BinaryResultTypes, CONCATENATE, DIVIDE, EQ, GE, GT, LE, leftInterfaceType, leftOperand, LIKE, LT, methodName, MINUS, NE, operator, operatorType, OR, PLUS, receiver, resultInterfaceType, rightInterfaceType, rightOperand, TIMES, XMLEXISTS_OP |
Fields inherited from class org.apache.derby.impl.sql.compile.ValueNode |
clause, dataTypeServices, IN_HAVING_CLAUSE, IN_SELECT_LIST, IN_UNKNOWN_CLAUSE, IN_WHERE_CLAUSE, transformed |
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 | |
BinaryComparisonOperatorNode()
|
Method Summary | |
void |
bindComparisonOperator()
Test the type compatability of the operands and set the type info for this node. |
ValueNode |
bindExpression(FromList fromList,
SubqueryList subqueryList,
java.util.Vector aggregateVector)
Bind this comparison operator. |
ValueNode |
changeToCNF(boolean underTopAndNode)
Finish putting an expression into conjunctive normal form. |
(package private) ValueNode |
eliminateNots(boolean underNotNode)
Eliminate NotNodes in the current query block. |
ValueNode |
genSQLJavaSQLTree()
generate a SQL->Java->SQL conversion tree above the left and right operand of this Binary Operator Node if needed. |
(package private) boolean |
getBetweenSelectivity()
Return whether or not to use the between selectivity for this node. |
boolean |
getForQueryRewrite()
Was this node generated in a query rewrite? |
(package private) BinaryOperatorNode |
getNegation(ValueNode leftOperand,
ValueNode rightOperand)
Negate the comparison. |
void |
init(java.lang.Object leftOperand,
java.lang.Object rightOperand,
java.lang.Object operator,
java.lang.Object methodName)
Initializer for a BinaryComparisonOperatorNode |
ValueNode |
preprocess(int numTables,
FromList outerFromList,
SubqueryList outerSubqueryList,
PredicateList outerPredicateList)
Preprocess an expression tree. |
(package private) void |
setBetweenSelectivity()
Use between selectivity when calculating the selectivity. |
void |
setForQueryRewrite(boolean val)
This node was generated as part of a query rewrite. |
Methods inherited from class org.apache.derby.impl.sql.compile.BinaryOperatorNode |
accept, bindXMLExists, categorize, constantExpression, generateExpression, getLeftOperand, getOrderableVariantType, getReceiverInterfaceName, getRightOperand, init, init, initializeResultField, isConstantExpression, printSubNodes, remapColumnReferencesToExpressions, setClause, setLeftOperand, setLeftRightInterfaceType, setMethodName, setOperator, setRightOperand, swapOperands, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private boolean forQueryRewrite
private boolean betweenSelectivity
Constructor Detail |
public BinaryComparisonOperatorNode()
Method Detail |
public void init(java.lang.Object leftOperand, java.lang.Object rightOperand, java.lang.Object operator, java.lang.Object methodName)
init
in class BinaryOperatorNode
leftOperand
- The left operand of the comparisonrightOperand
- The right operand of the comparisonoperator
- The name of the operatormethodName
- The name of the method to call in the generated
classpublic void setForQueryRewrite(boolean val)
val
- true if this was for a query rewrite
public boolean getForQueryRewrite()
void setBetweenSelectivity()
boolean getBetweenSelectivity()
public ValueNode bindExpression(FromList fromList, SubqueryList subqueryList, java.util.Vector aggregateVector) throws StandardException
bindExpression
in class BinaryOperatorNode
fromList
- The query's FROM listsubqueryList
- The subquery list being built as we find SubqueryNodesaggregateVector
- The aggregate vector being built as we find AggregateNodes
StandardException
- Thrown on errorpublic void bindComparisonOperator() throws StandardException
StandardException
- Thrown on errorpublic ValueNode preprocess(int numTables, FromList outerFromList, SubqueryList outerSubqueryList, PredicateList outerPredicateList) throws StandardException
preprocess
in class BinaryOperatorNode
numTables
- Number of tables in the DML StatementouterFromList
- FromList from outer query blockouterSubqueryList
- SubqueryList from outer query blockouterPredicateList
- PredicateList from outer query block
StandardException
- Thrown on errorValueNode eliminateNots(boolean underNotNode) throws StandardException
eliminateNots
in class ValueNode
underNotNode
- Whether or not we are under a NotNode.
StandardException
- Thrown on errorBinaryOperatorNode getNegation(ValueNode leftOperand, ValueNode rightOperand) throws StandardException
leftOperand
- The left operand of the comparison operatorrightOperand
- The right operand of the comparison operator
StandardException
- Thrown on errorpublic ValueNode changeToCNF(boolean underTopAndNode) throws StandardException
changeToCNF
in class ValueNode
underTopAndNode
- Whether or not we are under a top level AndNode.
StandardException
- Thrown on errorpublic ValueNode genSQLJavaSQLTree() throws StandardException
BinaryOperatorNode
genSQLJavaSQLTree
in class BinaryOperatorNode
StandardException
BinaryOperatorNode.genSQLJavaSQLTree()
|
Built on Mon 2007-06-04 09:58:47+0400, from revision ??? | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |