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

public final Class BinaryArithmeticOperatorNode

extends BinaryOperatorNode
Class Inheritance
Imports
java.util.List, org.apache.derby.shared.common.error.StandardException, org.apache.derby.shared.common.reference.ClassName, org.apache.derby.iapi.services.context.ContextManager, org.apache.derby.shared.common.sanity.SanityManager, org.apache.derby.iapi.sql.compile.TypeCompiler, org.apache.derby.iapi.types.DataTypeDescriptor, .TypeId

This node represents a binary arithmetic operator, like + or *.

Field Summary

Modifier and TypeField and Description
pack-priv static final int
pack-priv static final int
pack-priv static final int
pack-priv static final int
pack-priv static final int
pack-priv final int
kind

Hides org.apache.derby.impl.sql.compile.BinaryOperatorNode.kind.

This class is used to hold logically different objects for space efficiency.
Inherited from org.apache.derby.impl.sql.compile.BinaryOperatorNode:
ANDBinaryArgTypesBinaryMethodNamesBinaryOperatorsBinaryResultTypesCONCATENATEDIVIDEEQGEGTK_BASEK_XMLEXISTSK_XMLQUERYLEleftInterfaceTypeleftOperandLIKELTmethodNameMINUSNEoperatorORPLUSreceiverresultInterfaceTyperightInterfaceTyperightOperandTIMES

Constructor Summary

AccessConstructor and Description
pack-priv
BinaryArithmeticOperatorNode(int
The kind of operator
kind
,
ValueNode
The left operand
leftOperand
,
ValueNode
The right operand
rightOperand
,
ContextManager
The context manager
cm
)

Constructor for a BinaryArithmeticOperatorNode

Method Summary

Modifier and TypeMethod and Description
pack-priv ValueNode

Returns:

The new top of the expression tree.
bindExpression
(FromList
The query's FROM list
fromList
,
SubqueryList
The subquery list being built as we find SubqueryNodes
subqueryList
,
List<AggregateNode>
The aggregate list being built as we find AggregateNodes
aggregates
)

Overrides org.apache.derby.impl.sql.compile.BinaryOperatorNode.bindExpression.

Bind this operator

pack-priv boolean
isSameNodeKind(ValueNode
The other value node whose kind we want to compare with.
o
)

Overrides org.apache.derby.impl.sql.compile.BinaryOperatorNode.isSameNodeKind.

Some node classes represent several logical node types (to reduce footprint), which we call kinds.

Inherited from org.apache.derby.impl.sql.compile.BinaryOperatorNode:
acceptChildrenbindXMLQuerycategorizeconstantExpressiongenerateExpressiongenSQLJavaSQLTreegetLeftOperandgetOrderableVariantTypegetReceiverInterfaceNamegetRightOperandisConstantExpressionisEquivalentpreprocessprintSubNodesremapColumnReferencesToExpressionssetLeftOperandsetLeftRightInterfaceTypesetMethodNamesetOperatorsetRightOperandtoString

Field Detail

K_DIVIDEback to summary
pack-priv static final int K_DIVIDE
K_MINUSback to summary
pack-priv static final int K_MINUS
K_MODback to summary
pack-priv static final int K_MOD
K_PLUSback to summary
pack-priv static final int K_PLUS
K_TIMESback to summary
pack-priv static final int K_TIMES
kindback to summary
pack-priv final int kind

Hides org.apache.derby.impl.sql.compile.BinaryOperatorNode.kind.

This class is used to hold logically different objects for space efficiency. kind represents the logical object type. See also ValueNode#isSameNodeKind.

Constructor Detail

BinaryArithmeticOperatorNodeback to summary
pack-priv BinaryArithmeticOperatorNode(int kind, ValueNode leftOperand, ValueNode rightOperand, ContextManager cm)

Constructor for a BinaryArithmeticOperatorNode

Parameters
kind:int

The kind of operator

leftOperand:ValueNode

The left operand

rightOperand:ValueNode

The right operand

cm:ContextManager

The context manager

Method Detail

bindExpressionback to summary
pack-priv ValueNode bindExpression(FromList fromList, SubqueryList subqueryList, List<AggregateNode> aggregates) throws StandardException

Overrides org.apache.derby.impl.sql.compile.BinaryOperatorNode.bindExpression.

Bind this operator

Parameters
fromList:FromList

The query's FROM list

subqueryList:SubqueryList

The subquery list being built as we find SubqueryNodes

aggregates:List<AggregateNode>

The aggregate list being built as we find AggregateNodes

Returns:ValueNode

The new top of the expression tree.

Annotations
@Override
Exceptions
StandardException:
Thrown on error
isSameNodeKindback to summary
pack-priv boolean isSameNodeKind(ValueNode o)

Overrides org.apache.derby.impl.sql.compile.BinaryOperatorNode.isSameNodeKind.

Doc from org.apache.derby.impl.sql.compile.ValueNode.isSameNodeKind.

Some node classes represent several logical node types (to reduce footprint), which we call kinds. This means that implementations of isEquivalent cannot always just use instanceof to check if the other node represents the same kind. Hence this method needs to be overridden by all node classes that represent several kinds. This default implementation does not look at kinds. It is only called from implementations of isEquivalent.

Parameters
o:ValueNode

The other value node whose kind we want to compare with.

Returns:boolean

true if this and o represent the same logical node type, i.e. kind.

Annotations
@Override