/// <summary> /// 修改索引名称。 /// </summary> /// <param name="command">当前命令。</param> /// <param name="builder">SQL语句构建实例。</param> protected override void Generate( RenameIndexCommand command, IndentedStringBuilder builder) { Check.NotNull(command, nameof(command)); Check.NotNull(builder, nameof(builder)); var qualifiedName = new StringBuilder(); if (command.Schema != null) { qualifiedName .Append(command.Schema) .Append("."); } qualifiedName .Append(Prefix(command.Table)) .Append(".") .Append(Prefix(command.Name)); Rename(qualifiedName.ToString(), Prefix(command.NewName), "INDEX", builder); }
/// <summary> /// 修改索引名称。 /// </summary> /// <param name="command">当前命令。</param> /// <param name="builder">SQL语句构建实例。</param> protected abstract void Generate(RenameIndexCommand command, IndentedStringBuilder builder);