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

public final Class NotNode

extends UnaryLogicalOperatorNode
Class Inheritance
Imports
java.lang.reflect.Modifier, 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.LocalField, .MethodBuilder, org.apache.derby.iapi.services.context.ContextManager

A NotNode represents a NOT operator. Preprocessing will eliminate the NotNodes which exist above comparison operators so that the optimizer will see a query tree in CNF.

Constructor Summary

AccessConstructor and Description
pack-priv
NotNode(ValueNode
The operand of the NOT
operand
,
ContextManager
context manager
cm
)

Method Summary

Modifier and TypeMethod and Description
pack-priv ValueNode

Returns:

The modified expression
eliminateNots
(boolean
Whether or not we are under a NotNode.
underNotNode
)

Overrides org.apache.derby.impl.sql.compile.ValueNode.eliminateNots.

Eliminate NotNodes in the current query block.

pack-priv void
generateExpression(ExpressionClassBuilder
The ExpressionClassBuilder for the class we're generating
acb
,
MethodBuilder
The method the expression will go into
mb
)

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

Do code generation for the NOT operator.

Inherited from org.apache.derby.impl.sql.compile.UnaryLogicalOperatorNode:
bindExpressionsetFullTypeInfo

Constructor Detail

NotNodeback to summary
pack-priv NotNode(ValueNode operand, ContextManager cm) throws StandardException
Parameters
operand:ValueNode

The operand of the NOT

cm:ContextManager

context manager

Method Detail

eliminateNotsback to summary
pack-priv ValueNode eliminateNots(boolean underNotNode) throws StandardException

Overrides org.apache.derby.impl.sql.compile.ValueNode.eliminateNots.

Eliminate NotNodes in the current query block. We traverse the tree, inverting ANDs and ORs and eliminating NOTs as we go. We stop at ComparisonOperators and boolean expressions. We invert ComparisonOperators and replace boolean expressions with boolean expression = false.

Parameters
underNotNode:boolean

Whether or not we are under a NotNode.

Returns:ValueNode

The modified expression

Annotations
@Override
Exceptions
StandardException:
Thrown on error
generateExpressionback to summary
pack-priv void generateExpression(ExpressionClassBuilder acb, MethodBuilder mb) throws StandardException

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

Do code generation for the NOT operator.

Parameters
acb:ExpressionClassBuilder

The ExpressionClassBuilder for the class we're generating

mb:MethodBuilder

The method the expression will go into

Annotations
@Override
Exceptions
StandardException:
Thrown on error