/** * Get the parameter operand of this unary operator. * For the example below, for abs unary operator node, we want to get ? * select * from t1 where -? = max_cni(abs(-?), sqrt(+?)) * * This gets called when ParameterNode is needed to get parameter * specific information like getDefaultValue(), getParameterNumber() etc * * @return The parameter operand of this unary operator else null. */ public ValueNode getParameterOperand() throws StandardException { if (requiresTypeFromContext() == false) return null; else { UnaryOperatorNode tempUON = this; ValueNode operand = tempUON.getOperand(); Class<?> opclass; while ((opclass = (operand = tempUON.getOperand()).getClass()) != ParameterNode.class && opclass != ParameterizedConstantNode.class) { tempUON = (UnaryOperatorNode)operand; } return tempUON.getOperand(); } }
/** * Get the parameter operand of this unary operator. * For the example below, for abs unary operator node, we want to get ? * select * from t1 where -? = max_cni(abs(-?), sqrt(+?)) * * This gets called when ParameterNode is needed to get parameter * specific information like getDefaultValue(), getParameterNumber() etc * * @return The parameter operand of this unary operator else null. */ public ValueNode getParameterOperand() throws StandardException { if (requiresTypeFromContext() == false) return null; else { UnaryOperatorNode tempUON = this; ValueNode operand = tempUON.getOperand(); Class<?> opclass; while ((opclass = (operand = tempUON.getOperand()).getClass()) != ParameterNode.class && opclass != ParameterizedConstantNode.class) { tempUON = (UnaryOperatorNode)operand; } return tempUON.getOperand(); } }
/** * Get the parameter operand of this unary operator. * For the example below, for abs unary operator node, we want to get ? * select * from t1 where -? = max_cni(abs(-?), sqrt(+?)) * * This gets called when ParameterNode is needed to get parameter * specific information like getDefaultValue(), getParameterNumber() etc * * @return The parameter operand of this unary operator else null. */ public ValueNode getParameterOperand() throws StandardException { if (requiresTypeFromContext() == false) return null; else { UnaryOperatorNode tempUON = this; ValueNode operand = tempUON.getOperand(); Class<?> opclass; while ((opclass = (operand = tempUON.getOperand()).getClass()) != ParameterNode.class && opclass != ParameterizedConstantNode.class) { tempUON = (UnaryOperatorNode)operand; } return tempUON.getOperand(); } }
if (uon.getOperand() instanceof ColumnReference) cr1 = (ColumnReference) uon.getOperand();
if (uon.getOperand() instanceof ColumnReference) cr1 = (ColumnReference) uon.getOperand();
if (uon.getOperand() instanceof ColumnReference) cr1 = (ColumnReference) uon.getOperand();
((UnaryOperatorNode)this).getOperand().getTypeServices(), true));
((UnaryOperatorNode)this).getOperand().getTypeServices(), true));
((UnaryOperatorNode)this).getOperand().getTypeServices(), true));