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
class AndNoShortCircuitNode extends AndNode
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(java.lang.String, java.lang.String, java.lang.String, org.apache.derby.iapi.sql.Activation, int)
.
-
-
Field Summary
-
Fields inherited from class org.apache.derby.impl.sql.compile.BinaryLogicalOperatorNode
shortCircuitValue
-
Fields inherited from class org.apache.derby.impl.sql.compile.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, TIMES
-
Fields inherited from class org.apache.derby.impl.sql.compile.ValueNode
transformed
-
Fields inherited from class org.apache.derby.impl.sql.compile.QueryTreeNode
AUTOINCREMENT_CREATE_MODIFY, AUTOINCREMENT_CYCLE, AUTOINCREMENT_INC_INDEX, AUTOINCREMENT_IS_AUTOINCREMENT_INDEX, AUTOINCREMENT_START_INDEX
-
-
Constructor Summary
Constructors Constructor Description AndNoShortCircuitNode(ValueNode leftOperand, ValueNode rightOperand, ContextManager cm)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) void
generateExpression(ExpressionClassBuilder acb, MethodBuilder mb)
Generate code for no short-circuiting AND operator.-
Methods inherited from class org.apache.derby.impl.sql.compile.AndNode
bindExpression, changeToCNF, eliminateNots, postBindFixup, preprocess, putAndsOnTop, verifyChangeToCNF, verifyPutAndsOnTop
-
Methods inherited from class org.apache.derby.impl.sql.compile.BinaryLogicalOperatorNode
resolveLogicalBinaryOperator, verifyEliminateNots
-
Methods inherited from class org.apache.derby.impl.sql.compile.BinaryOperatorNode
acceptChildren, bindXMLQuery, categorize, constantExpression, genSQLJavaSQLTree, getLeftOperand, getOrderableVariantType, getReceiverInterfaceName, getRightOperand, isConstantExpression, isEquivalent, isSameNodeKind, printSubNodes, remapColumnReferencesToExpressions, setLeftOperand, setLeftRightInterfaceType, setMethodName, setOperator, setRightOperand, toString
-
Methods inherited from class org.apache.derby.impl.sql.compile.OperatorNode
pushSqlXmlUtil
-
Methods inherited from class org.apache.derby.impl.sql.compile.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, updatableByCursor
-
Methods inherited from class org.apache.derby.impl.sql.compile.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 Detail
-
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 Detail
-
generateExpression
void generateExpression(ExpressionClassBuilder acb, MethodBuilder mb) throws StandardException
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:
generateExpression
in classBinaryLogicalOperatorNode
- Parameters:
acb
- The ExpressionClassBuilder for the class we're generatingmb
- The method the code to place the code- Throws:
StandardException
- standard error policy
-
-