public bool VisitExprDecimalLiteral(ExprDecimalLiteral expr, TCtx arg) { var res = this.Visit(expr, "DecimalLiteral", arg, out var argOut); this.VisitPlainProperty("Value", expr.Value, argOut); this._visitor.EndVisitExpr(expr, arg); return(res); }
public TRes VisitExprDecimalLiteral(ExprDecimalLiteral decimalLiteral, ExprValueTypeAnalyzerCtx <TRes, TCtx> ctx) { DecimalPrecisionScale?precisionScale = null; if (decimalLiteral.Value.HasValue) { SqlDecimal sd = decimalLiteral.Value.Value; precisionScale = new DecimalPrecisionScale(sd.Precision, sd.Scale); } return(ctx.ValueVisitor.VisitDecimal(ctx.Ctx, !decimalLiteral.Value.HasValue, precisionScale)); }
public bool VisitExprDecimalLiteral(ExprDecimalLiteral decimalLiteral, IExpr?parent) { if (decimalLiteral.Value.HasValue) { this.Builder.Append(decimalLiteral.Value.Value.ToString(CultureInfo.InvariantCulture)); } else { this.AppendNull(); } return(true); }
public static ExprDecimalLiteral WithValue(this ExprDecimalLiteral original, Decimal?newValue) => new ExprDecimalLiteral(value: newValue);