Class AndNoShortCircuitNode
java.lang.Object
org.apache.derby.impl.sql.compile.QueryTreeNode
org.apache.derby.impl.sql.compile.ValueNode
org.apache.derby.impl.sql.compile.OperatorNode
org.apache.derby.impl.sql.compile.BinaryOperatorNode
org.apache.derby.impl.sql.compile.BinaryLogicalOperatorNode
org.apache.derby.impl.sql.compile.AndNode
org.apache.derby.impl.sql.compile.AndNoShortCircuitNode
- All Implemented Interfaces:
Visitable
Used for deferrable CHECK constraint. When we evaluate check constraints for
a row where at least one constraint is deferrable, we need to know exactly
which set of constraints violated the checks. The normal evaluation of
check constraints is generated as one big (NOT c1) AND (NOT c2) AND ... AND
(NOT cn) using short-circuited (McCarthy) boolean evaluation.
This kind of evaluation of the expression can only tell us the first failing
constraint, so we use full evaluation instead, as embodied in this node.
See also BooleanDataValue.throwExceptionIfImmediateAndFalse(String, String, String, Activation, int).
-
Field Summary
Fields inherited from class BinaryLogicalOperatorNode
shortCircuitValueFields inherited from class BinaryOperatorNode
AND, BinaryArgTypes, BinaryMethodNames, BinaryOperators, BinaryResultTypes, CONCATENATE, DIVIDE, EQ, GE, GT, K_BASE, K_XMLEXISTS, K_XMLQUERY, kind, LE, leftInterfaceType, leftOperand, LIKE, LT, methodName, MINUS, NE, operator, OR, PLUS, receiver, resultInterfaceType, rightInterfaceType, rightOperand, TIMESFields inherited from class ValueNode
transformedFields inherited from class QueryTreeNode
AUTOINCREMENT_CREATE_MODIFY, AUTOINCREMENT_CYCLE, AUTOINCREMENT_INC_INDEX, AUTOINCREMENT_IS_AUTOINCREMENT_INDEX, AUTOINCREMENT_START_INDEX -
Constructor Summary
ConstructorsConstructorDescriptionAndNoShortCircuitNode(ValueNode leftOperand, ValueNode rightOperand, ContextManager cm) -
Method Summary
Modifier and TypeMethodDescription(package private) voidGenerate code for no short-circuiting AND operator.Methods inherited from class AndNode
bindExpression, changeToCNF, eliminateNots, postBindFixup, preprocess, putAndsOnTop, verifyChangeToCNF, verifyPutAndsOnTopMethods inherited from class BinaryLogicalOperatorNode
resolveLogicalBinaryOperator, verifyEliminateNotsMethods inherited from class BinaryOperatorNode
acceptChildren, bindXMLQuery, categorize, constantExpression, genSQLJavaSQLTree, getLeftOperand, getOrderableVariantType, getReceiverInterfaceName, getRightOperand, isConstantExpression, isEquivalent, isSameNodeKind, printSubNodes, remapColumnReferencesToExpressions, setLeftOperand, setLeftRightInterfaceType, setMethodName, setOperator, setRightOperand, toStringMethods inherited from class OperatorNode
pushSqlXmlUtilMethods inherited from class ValueNode
bindExpression, checkIsBoolean, checkTopPredicatesForEqualsConditions, copyFields, evaluateConstantExpressions, genEqualsFalseTree, generate, genIsNullTree, getClone, getColumnName, getConstantValueAsObject, getDataValueFactory, getSchemaName, getSourceResultColumn, getTableName, getTablesReferenced, getTransformed, getTypeCompiler, getTypeId, getTypeServices, isBinaryEqualsOperatorNode, isBooleanFalse, isBooleanTrue, isCloneable, isInListProbeNode, isParameterNode, isRelationalOperator, optimizableEqualityNode, requiresTypeFromContext, selectivity, setCollationInfo, setCollationInfo, setCollationUsingCompilationSchema, setCollationUsingCompilationSchema, setNullability, setTransformed, setType, setType, setType, updatableByCursorMethods inherited from class QueryTreeNode
accept, addTag, addUDTUsagePriv, addUDTUsagePriv, bindOffsetFetch, bindRowMultiSet, bindUserCatalogType, bindUserType, checkReliability, checkReliability, convertDefaultNode, copyTagsFrom, createTypeDependency, debugFlush, debugPrint, disablePrivilegeCollection, formatNodeString, generateAuthorizeCheck, getBeginOffset, getClassFactory, getCompilerContext, getContext, getContextManager, getDataDictionary, getDependencyManager, getEndOffset, getExecutionFactory, getGenericConstantActionFactory, getIntProperty, getLanguageConnectionContext, getLongProperty, getNullNode, getOffsetOrderedNodes, getOptimizerFactory, getOptimizerTracer, getParameterTypes, getSchemaDescriptor, getSchemaDescriptor, getStatementType, getTableDescriptor, getTypeCompiler, getUDTDesc, isAtomic, isPrivilegeCollectionRequired, isSessionSchema, isSessionSchema, makeConstantAction, makeTableName, makeTableName, nodeHeader, optimizerTracingIsOn, orReliability, parseSearchCondition, parseStatement, printLabel, referencesSessionSchema, resolveTableToSynonym, setBeginOffset, setEndOffset, setRefActionInfo, stackPrint, taggedWith, treePrint, treePrint, verifyClassExist
-
Constructor Details
-
AndNoShortCircuitNode
AndNoShortCircuitNode(ValueNode leftOperand, ValueNode rightOperand, ContextManager cm) throws StandardException - Parameters:
leftOperand- The left operand of the ANDrightOperand- The right operand of the ANDcm- context manager- Throws:
StandardException- standard error policy
-
-
Method Details
-
generateExpression
Generate code for no short-circuiting AND operator. Used to evaluate check constraints where at least one is deferrable, since we need to know exactly which constraint(s) violated the checks.- Overrides:
generateExpressionin classBinaryLogicalOperatorNode- Parameters:
acb- The ExpressionClassBuilder for the class we're generatingmb- The method the code to place the code- Throws:
StandardException- standard error policy
-