/// <summary> /// 删除列。 /// </summary> /// <param name="command">当前命令。</param> /// <param name="builder">SQL语句构建实例。</param> protected override void Generate( DropColumnCommand command, IndentedStringBuilder builder) { Check.NotNull(command, nameof(command)); Check.NotNull(builder, nameof(builder)); DropDefaultConstraint(command.Schema, command.Table, command.Name, builder); base.Generate(command, builder); }
/// <summary> /// 删除列。 /// </summary> /// <param name="command">当前命令。</param> /// <param name="builder">SQL语句构建实例。</param> protected virtual void Generate(DropColumnCommand command, IndentedStringBuilder builder) { Check.NotNull(command, nameof(command)); Check.NotNull(builder, nameof(builder)); builder .Append("ALTER TABLE ") .Append(Sql.DelimitIdentifier(Prefix(command.Table), command.Schema)) .Append(" DROP COLUMN ") .Append(Sql.DelimitIdentifier(command.Name)); }