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); } }
protected override void AppendTo(SqlStringBuilder builder) { builder.Append(TypeCode.ToString().ToUpperInvariant()); if (MaxSize > 0) { builder.AppendFormat("({0})", MaxSize); } }
void ISqlFormattable.AppendTo(SqlStringBuilder builder) { var totalYears = TotalYears; var sign = System.Math.Sign(TotalMonths); var y = System.Math.Truncate(totalYears); var m = System.Math.Abs(TotalMonths - (y * 12)); builder.AppendFormat("{0}{1}.{2}", (sign < 0) ? "-" : "", y, m); }
void ISqlFormattable.AppendTo(SqlStringBuilder builder) { if (IsNamed) { builder.AppendFormat("{0} => ", Name); } Value.AppendTo(builder); }
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); } }