void ISqlFormattable.AppendTo(SqlStringBuilder builder) { switch (state) { case (NumericState.None): { if (CanBeInt32 || CanBeInt64) { builder.Append(valueAsLong); } else { var norm = BigMath.StripTrailingZeros(innerValue); builder.Append(norm.ToString()); } break; } case (NumericState.NegativeInfinity): builder.Append("-Infinity"); break; case (NumericState.PositiveInfinity): builder.Append("+Infinity"); break; case (NumericState.NotANumber): builder.Append("NaN"); break; default: throw new InvalidCastException("Unknown number state"); } }
protected override void AppendTo(SqlStringBuilder builder) { if (TypeCode == SqlTypeCode.LongVarChar) { builder.Append("LONG CHARACTER VARYING"); } else { base.AppendTo(builder); } if (MaxSize >= 0) { if (MaxSize == DefaultMaxSize) { builder.Append("(MAX)"); } else { builder.AppendFormat("({0})", MaxSize); } } if (Locale != null) { builder.AppendFormat(" COLLATE '{0}'", Locale.Name); } }
void ISqlFormattable.AppendTo(SqlStringBuilder builder) { if (Parent != null) { Parent.AppendTo(builder); builder.Append('.'); } builder.Append(Name); }
void ISqlFormattable.AppendTo(SqlStringBuilder builder) { if (IsUnknown) { builder.Append("UNKNOWN"); } else if (IsNull) { builder.Append("NULL"); } else { builder.Append(Type.ToSqlString(Value)); } }
void ISqlFormattable.AppendTo(SqlStringBuilder builder) { builder.Append("("); for (int i = 0; i < expressions.Length; i++) { (expressions[i] as ISqlFormattable).AppendTo(builder); if (i < expressions.Length - 1) { builder.Append(", "); } } builder.Append(")"); }
protected override void AppendTo(SqlStringBuilder builder) { builder.Append(TypeCode.ToString().ToUpperInvariant()); if (MaxSize > 0) { builder.AppendFormat("({0})", MaxSize); } }
protected override void AppendTo(SqlStringBuilder builder) { base.AppendTo(builder); if (TypeCode == SqlTypeCode.Numeric) { if (Precision > 0) { builder.Append("("); builder.Append(Precision); if (Scale > 0) { builder.Append(","); builder.Append(Scale); } builder.Append(")"); } } }
void ISqlFormattable.AppendTo(SqlStringBuilder builder) { builder.Append("WHEN "); if (Handled.IsForOthers) { builder.Append("OTHERS"); } else { var names = String.Join(", ", Handled.ExceptionNames.ToArray()); builder.Append(names); } builder.AppendLine("THEN "); builder.Indent(); foreach (var statement in Statements) { statement.AppendTo(builder); builder.AppendLine(); } builder.DeIndent(); }
void ISqlFormattable.AppendTo(SqlStringBuilder builder) { builder.Append(value.ToString("c")); }
protected virtual void AppendTo(SqlStringBuilder builder) { builder.Append(TypeCode.ToString().ToUpperInvariant()); }
void ISqlFormattable.AppendTo(SqlStringBuilder sql) { sql.Append("NULL"); }
void ISqlFormattable.AppendTo(SqlStringBuilder builder) { builder.Append(ToString()); }
protected override void AppendTo(SqlStringBuilder builder) { builder.Append(TypeCode.ToString().ToUpperInvariant()); if (MaxSize >= 0) { if (MaxSize == Int16.MaxValue) builder.Append("(MAX)"); else builder.AppendFormat("({0})", MaxSize); } }
void ISqlFormattable.AppendTo(SqlStringBuilder builder) { builder.Append(Name); builder.Append(" "); Type.AppendTo(builder); if (IsInput && !IsOutput) { builder.Append(" IN"); } else if (IsOutput && !IsInput) { builder.Append(" OUT"); } else if (IsOutput && IsInput) { builder.Append(" IN OUT"); } if (!IsNullable) builder.Append(" NOT NULL"); if (IsUnbounded) builder.Append(" UNBOUNDED"); }
protected override void AppendTo(SqlStringBuilder builder) { builder.Append("DETERMINISTIC"); }