示例#1
0
        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();
        }
示例#2
0
        void ISqlFormattable.AppendTo(SqlStringBuilder builder)
        {
            if (IsNamed) {
                builder.AppendFormat("{0} => ", Name);
            }

            Value.AppendTo(builder);
        }
示例#3
0
        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);
            }
        }
示例#4
0
 public override string ToString()
 {
     var builder = new SqlStringBuilder();
     this.AppendTo(builder);
     return builder.ToString();
 }
示例#5
0
        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");
        }
示例#6
0
 protected virtual void AppendTo(SqlStringBuilder builder)
 {
     builder.Append(TypeCode.ToString().ToUpperInvariant());
 }
示例#7
0
 void ISqlFormattable.AppendTo(SqlStringBuilder builder)
 {
     AppendTo(builder);
 }
示例#8
0
 protected override void AppendTo(SqlStringBuilder builder)
 {
     builder.Append("DETERMINISTIC");
 }
 public static void AppendTo(this ISqlFormattable obj, SqlStringBuilder builder)
 {
     obj.AppendTo(builder);
 }
示例#10
0
 void ISqlFormattable.AppendTo(SqlStringBuilder sql)
 {
     sql.Append("NULL");
 }