public override SqlExpression VisitConstantNumeric(PlSqlParser.ConstantNumericContext context) { var value = context.numeric().GetText(); var formatInfo = new NumberFormatInfo { NumberDecimalSeparator = "." }; var number = SqlNumber.Parse(value, formatInfo); SqlObject obj; if (number.CanBeInt32) { obj = SqlObject.Integer((int)number); } else if (number.CanBeInt64) { obj = SqlObject.BigInt((long)number); } else { obj = SqlObject.Numeric(number); } return(SqlExpression.Constant(obj)); }
public override SqlExpression VisitConstantNumeric(PlSqlParser.ConstantNumericContext context) { var value = context.numeric().GetText(); var formatInfo = new NumberFormatInfo { NumberDecimalSeparator = "." }; var dValue = Double.Parse(value, formatInfo); return(SqlExpression.Constant(Field.Number(new SqlNumber(dValue)))); }