示例#1
0
        public virtual IEnumerable <string> Run(ICreateForeignKeyCommand command)
        {
            var builder = new StringBuilder();

            builder.Append("alter table ")
            .Append(_dialect.QuoteForTableName(command.SrcTable));

            builder.Append(_dialect.GetAddForeignKeyConstraintString(command.Name,
                                                                     command.SrcColumns.Select(x => _dialect.QuoteForColumnName(x)).ToArray(),
                                                                     _dialect.QuoteForTableName(command.DestTable),
                                                                     command.DestColumns.Select(x => _dialect.QuoteForColumnName(x)).ToArray(),
                                                                     false));

            yield return(builder.ToString());
        }
 public override IEnumerable <string> Run(ICreateForeignKeyCommand command)
 {
     yield break;
 }