Example #1
0
        protected override DbCommand OnBuildCreateColumnCommand(ICreateColumn Query)
        {
            SqlCommand    command;
            StringBuilder sql;


            sql = new StringBuilder();
            sql.Append("ALTER TABLE ");
            sql.Append(OnFormatTableName(Query.Table));
            sql.Append($" ADD {OnFormatColumnName(Query.Column, false)} {GetTypeName(Query.Column)} {(Query.Column.IsNullable ? "NULL" : "NOT NULL")}{GetConstraint(Query.Column)}");

            command = new SqlCommand(sql.ToString());
            return(command);
        }
Example #2
0
 protected abstract DbCommand OnBuildCreateColumnCommand(ICreateColumn Query);