org.apache.derby.impl.sql.compile
Class BinaryLogicalOperatorNode
java.lang.Object
org.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.BinaryLogicalOperatorNode
- All Implemented Interfaces:
- Visitable
- Direct Known Subclasses:
- AndNode, IsNode, OrNode
abstract class BinaryLogicalOperatorNode
- extends BinaryOperatorNode
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, XMLQUERY_OP |
Methods inherited from class org.apache.derby.impl.sql.compile.BinaryOperatorNode |
acceptChildren, bindXMLQuery, categorize, constantExpression, genSQLJavaSQLTree, getLeftOperand, getOrderableVariantType, getReceiverInterfaceName, getRightOperand, init, init, initializeResultField, isConstantExpression, isEquivalent, preprocess, printSubNodes, remapColumnReferencesToExpressions, setLeftOperand, setLeftRightInterfaceType, setMethodName, setOperator, setRightOperand, toString |
Methods inherited from class org.apache.derby.impl.sql.compile.ValueNode |
bindExpression, changeToCNF, checkIsBoolean, checkTopPredicatesForEqualsConditions, copyFields, eliminateNots, evaluateConstantExpressions, genEqualsFalseTree, generate, generateFilter, genIsNullTree, getClone, getColumnName, getConstantValueAsObject, getDataValueFactory, getSchemaName, getSourceResultColumn, getTableName, getTablesReferenced, getTransformed, getTypeCompiler, getTypeId, getTypeServices, init, isBinaryEqualsOperatorNode, isBooleanFalse, isBooleanTrue, isCloneable, isInListProbeNode, isParameterNode, isRelationalOperator, isSameNodeType, optimizableEqualityNode, putAndsOnTop, requiresTypeFromContext, selectivity, setCollationInfo, setCollationInfo, setCollationUsingCompilationSchema, setCollationUsingCompilationSchema, setNullability, setTransformed, setType, setType, setType, updatableByCursor, verifyChangeToCNF, verifyPutAndsOnTop |
Methods inherited from class org.apache.derby.impl.sql.compile.QueryTreeNode |
accept, bindOffsetFetch, bindRowMultiSet, bindUserType, checkReliability, checkReliability, convertDefaultNode, createTypeDependency, debugFlush, debugPrint, disablePrivilegeCollection, formatNodeString, foundString, generateAuthorizeCheck, getBeginOffset, getClassFactory, getCompilerContext, getContextManager, getCursorInfo, getDataDictionary, getDependencyManager, getEndOffset, getExecutionFactory, getGenericConstantActionFactory, getIntProperty, getLanguageConnectionContext, getNodeFactory, getNodeType, getNullNode, getParameterTypes, getRowEstimate, getSchemaDescriptor, getSchemaDescriptor, getStatementType, getTableDescriptor, getTypeCompiler, init, init, init, init, init, init, init, init, init, init, isAtomic, isInstanceOf, isPrivilegeCollectionRequired, isSessionSchema, isSessionSchema, makeConstantAction, makeTableName, makeTableName, nodeHeader, orReliability, parseStatement, printLabel, referencesSessionSchema, resolveTableToSynonym, setBeginOffset, setContextManager, setEndOffset, setNodeType, setRefActionInfo, stackPrint, treePrint, treePrint, verifyClassExist |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
shortCircuitValue
boolean shortCircuitValue
BinaryLogicalOperatorNode
BinaryLogicalOperatorNode()
init
public void init(java.lang.Object leftOperand,
java.lang.Object rightOperand,
java.lang.Object methodName)
- Initializer for a BinaryLogicalOperatorNode
- Overrides:
init
in class BinaryOperatorNode
- Parameters:
leftOperand
- The left operand of the comparisonrightOperand
- The right operand of the comparisonmethodName
- The name of the method to call in the generated
class. In this case, it's actually an operator
name.
bindExpression
public ValueNode bindExpression(FromList fromList,
SubqueryList subqueryList,
java.util.Vector aggregateVector)
throws StandardException
- Bind this logical operator. All that has to be done for binding
a logical operator is to bind the operands, check that both operands
are BooleanDataValue, and set the result type to BooleanDataValue.
- Overrides:
bindExpression
in class BinaryOperatorNode
- Parameters:
fromList
- The query's FROM listsubqueryList
- The subquery list being built as we find SubqueryNodesaggregateVector
- The aggregate vector being built as we find AggregateNodes
- Returns:
- The new top of the expression tree.
- Throws:
StandardException
- Thrown on error
verifyEliminateNots
boolean verifyEliminateNots()
- Verify that eliminateNots() did its job correctly. Verify that
there are no NotNodes above the top level comparison operators
and boolean expressions.
- Overrides:
verifyEliminateNots
in class ValueNode
- Returns:
- Boolean which reflects validity of the tree.
generateExpression
public void generateExpression(ExpressionClassBuilder acb,
MethodBuilder mb)
throws StandardException
- Do code generation for this logical binary operator.
This is used for AND and OR. the IsNode extends this class but
overrides generateExpression.
- Overrides:
generateExpression
in class BinaryOperatorNode
- Parameters:
acb
- The ExpressionClassBuilder for the class we're generatingmb
- The method the code to place the code
- Throws:
StandardException
- Thrown on error
resolveLogicalBinaryOperator
DataTypeDescriptor resolveLogicalBinaryOperator(DataTypeDescriptor leftType,
DataTypeDescriptor rightType)
throws StandardException
- Throws:
StandardException
Apache Derby V10.6 Internals - Copyright © 2004,2007 The Apache Software Foundation. All Rights Reserved.