|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.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.UnaryOperatorNode
org.apache.derby.impl.sql.compile.UnaryArithmeticOperatorNode
public class UnaryArithmeticOperatorNode
This node represents a unary arithmetic operator
| Field Summary | |
|---|---|
private static int |
ABSOLUTE
|
private int |
operatorType
|
private static int |
SQRT
|
private static java.lang.String[] |
UNARY_METHODS
|
private static int |
UNARY_MINUS
|
private static java.lang.String[] |
UNARY_OPERATORS
|
private static int |
UNARY_PLUS
|
| Fields inherited from class org.apache.derby.impl.sql.compile.UnaryOperatorNode |
|---|
methodName, operand, operator, receiverInterfaceType, resultInterfaceType, UnaryArgTypes, UnaryMethodNames, UnaryOperators, UnaryResultTypes, XMLPARSE_OP, XMLSERIALIZE_OP |
| 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_INC_INDEX, AUTOINCREMENT_IS_AUTOINCREMENT_INDEX, AUTOINCREMENT_START_INDEX, isPrivilegeCollectionRequired |
| Constructor Summary | |
|---|---|
UnaryArithmeticOperatorNode()
|
|
| Method Summary | |
|---|---|
ValueNode |
bindExpression(FromList fromList,
SubqueryList subqueryList,
java.util.List aggregateVector)
Bind this operator |
(package private) void |
bindParameter()
For SQRT and ABS the parameter becomes a DOUBLE. |
private void |
bindSQRTABS()
Bind SQRT or ABS |
private void |
checkOperandIsNumeric(TypeId operandType)
Only called for Unary +/-. |
void |
generateExpression(ExpressionClassBuilder acb,
MethodBuilder mb)
Do code generation for this unary plus operator |
void |
init(java.lang.Object operand)
Initializer for a UnaryArithmeticOperatorNode |
boolean |
isParameterNode()
A +? |
boolean |
requiresTypeFromContext()
Unary + and - require their type to be set if they wrap another node (e.g. a parameter) that requires type from its context. |
void |
setType(DataTypeDescriptor descriptor)
We are overwriting this method here because for -? |
| Methods inherited from class org.apache.derby.impl.sql.compile.UnaryOperatorNode |
|---|
acceptChildren, addXmlOpMethodParams, bindOperand, categorize, constantExpression, getOperand, getOperatorString, getOrderableVariantType, getParameterOperand, getReceiverInterfaceName, init, isConstantExpression, isEquivalent, preprocess, printSubNodes, remapColumnReferencesToExpressions, setMethodName, setOperator, toString |
| Methods inherited from class org.apache.derby.impl.sql.compile.OperatorNode |
|---|
pushSqlXmlUtil |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private static final int UNARY_PLUS
private static final int UNARY_MINUS
private static final int SQRT
private static final int ABSOLUTE
private static final java.lang.String[] UNARY_OPERATORS
private static final java.lang.String[] UNARY_METHODS
private int operatorType
| Constructor Detail |
|---|
public UnaryArithmeticOperatorNode()
| Method Detail |
|---|
public void init(java.lang.Object operand)
init in interface Nodeinit in class UnaryOperatorNodeoperand - The operand of the nodepublic boolean requiresTypeFromContext()
requiresTypeFromContext in class ValueNodeValueNode.requiresTypeFromContext()public boolean isParameterNode()
isParameterNode in class ValueNode
void bindParameter()
throws StandardException
bindParameter in class UnaryOperatorNodeStandardException - Thrown if ? parameter doesn't
have a type bound to it yet.
? parameter where it isn't allowed.
public ValueNode bindExpression(FromList fromList,
SubqueryList subqueryList,
java.util.List aggregateVector)
throws StandardException
bindExpression in class UnaryOperatorNodefromList - The query's FROM listsubqueryList - The subquery list being built as we find SubqueryNodesaggregateVector - The aggregate vector being built as we find AggregateNodes
StandardException - Thrown on error
private void checkOperandIsNumeric(TypeId operandType)
throws StandardException
StandardException
public void generateExpression(ExpressionClassBuilder acb,
MethodBuilder mb)
throws StandardException
generateExpression in class UnaryOperatorNodeacb - The ExpressionClassBuilder for the class we're generatingmb - The method the expression will go into
StandardException - Thrown on error
private void bindSQRTABS()
throws StandardException
StandardException - Thrown on error
public void setType(DataTypeDescriptor descriptor)
throws StandardException
setType in class ValueNodedescriptor - The DataTypeServices to set in this
ValueNode
StandardException
|
Built on Wed 2013-06-12 15:21:56+0000, from revision ??? | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||