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

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