/// <summary>
        /// 索引相关。
        /// </summary>
        /// <param name="command">命令。</param>
        /// <param name="builder">SQL构建实例。</param>
        protected override void IndexTraits(MigrationCommand command, IndentedStringBuilder builder)
        {
            Check.NotNull(command, nameof(command));
            Check.NotNull(builder, nameof(builder));

            var clustered = (command as IIndexable)?.IsCustered;
            if (clustered.HasValue)
            {
                builder.Append(clustered.Value ? "CLUSTERED " : "NONCLUSTERED ");
            }
        }
        /// <summary>
        /// SQL代码生成器。
        /// </summary>
        /// <param name="command">当前迁移命令。</param>
        /// <returns>返回当前命令生成的SQL代码。</returns>
        public string Generate(MigrationCommand command)
        {
            Check.NotNull(command, nameof(command));
            var builder = new IndentedStringBuilder();
            Action<MigrationsSqlGenerator, MigrationCommand, IndentedStringBuilder> generateAction;
            if (!_generateActions.TryGetValue(command.GetType(), out generateAction))
            {
                throw new Exception($"为找到类型为{command.GetType()}的命令解析器!");
            }

            generateAction(this, command, builder);
            var sql = builder.ToString();
            if (string.IsNullOrWhiteSpace(sql))
                return null;
            return sql;
        }