use of net.sf.jsqlparser.expression.SignedExpression in project spanner-jdbc by olavloite.
the class AbstractSpannerExpressionVisitorAdapter method visit.
@Override
public void visit(SignedExpression value) {
Expression underlyingValue = value.getExpression();
if (underlyingValue instanceof DoubleValue) {
DoubleValue doubleValue = (DoubleValue) underlyingValue;
doubleValue.setValue(value.getSign() == '-' ? -doubleValue.getValue() : doubleValue.getValue());
visit(doubleValue);
} else if (underlyingValue instanceof LongValue) {
LongValue longValue = (LongValue) underlyingValue;
longValue.setValue(value.getSign() == '-' ? -longValue.getValue() : longValue.getValue());
visit(longValue);
} else {
super.visit(value);
}
}
Aggregations