Top Description Constructors Methods
org.apache.derby.impl.sql.compile

pack-priv Class AndNoShortCircuitNode

extends AndNode
Class Inheritance
Imports
org.apache.derby.shared.common.error.StandardException, org.apache.derby.shared.common.reference.ClassName, org.apache.derby.iapi.services.classfile.VMOpcode, org.apache.derby.iapi.services.compiler.MethodBuilder, org.apache.derby.iapi.services.context.ContextManager

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 org.apache.derby.iapi.types.BooleanDataValue#throwExceptionIfImmediateAndFalse.

Constructor Summary

AccessConstructor and Description
pack-priv
AndNoShortCircuitNode(ValueNode
The left operand of the AND
leftOperand
,
ValueNode
The right operand of the AND
rightOperand
,
ContextManager
context manager
cm
)

Method Summary

Modifier and TypeMethod and Description
pack-priv void
generateExpression(ExpressionClassBuilder
The ExpressionClassBuilder for the class we're generating
acb
,
MethodBuilder
The method the code to place the code
mb
)

Overrides org.apache.derby.impl.sql.compile.BinaryLogicalOperatorNode.generateExpression.

Generate code for no short-circuiting AND operator.

Inherited from org.apache.derby.impl.sql.compile.AndNode:
bindExpressionchangeToCNFeliminateNotspostBindFixuppreprocessputAndsOnTopverifyChangeToCNFverifyPutAndsOnTop

Constructor Detail

AndNoShortCircuitNodeback to summary
pack-priv AndNoShortCircuitNode(ValueNode leftOperand, ValueNode rightOperand, ContextManager cm) throws StandardException
Parameters
leftOperand:ValueNode

The left operand of the AND

rightOperand:ValueNode

The right operand of the AND

cm:ContextManager

context manager

Exceptions
StandardException:
standard error policy

Method Detail

generateExpressionback to summary
pack-priv void generateExpression(ExpressionClassBuilder acb, MethodBuilder mb) throws StandardException

Overrides org.apache.derby.impl.sql.compile.BinaryLogicalOperatorNode.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.

Parameters
acb:ExpressionClassBuilder

Doc from org.apache.derby.impl.sql.compile.BinaryLogicalOperatorNode.generateExpression.

The ExpressionClassBuilder for the class we're generating

mb:MethodBuilder

Doc from org.apache.derby.impl.sql.compile.BinaryLogicalOperatorNode.generateExpression.

The method the code to place the code

Annotations
@Override
Exceptions
StandardException:
standard error policy