public void Visit(ISchemaBuilderCommand command)
        {
            var schemaCommand = command as SchemaCommand;
            if (schemaCommand == null) {
                return;
            }

            switch ( schemaCommand.Type ) {
                case SchemaCommandType.CreateTable:
                    Visit((CreateTableCommand)schemaCommand);
                    break;
                case SchemaCommandType.AlterTable:
                    Visit((AlterTableCommand)schemaCommand);
                    break;
                case SchemaCommandType.DropTable:
                    Visit((DropTableCommand)schemaCommand);
                    break;
                case SchemaCommandType.SqlStatement:
                    Visit((SqlStatementCommand)schemaCommand);
                    break;
                case SchemaCommandType.CreateForeignKey:
                    Visit((CreateForeignKeyCommand)schemaCommand);
                    break;
                case SchemaCommandType.DropForeignKey:
                    Visit((DropForeignKeyCommand)schemaCommand);
                    break;
            }
        }
Ejemplo n.º 2
0
        public void Visit(ISchemaBuilderCommand command)
        {
            var schemaCommand = command as SchemaCommand;

            if (schemaCommand == null)
            {
                return;
            }

            switch (schemaCommand.Type)
            {
            case SchemaCommandType.CreateTable:
                Visit((CreateTableCommand)schemaCommand);
                break;

            case SchemaCommandType.AlterTable:
                Visit((AlterTableCommand)schemaCommand);
                break;

            case SchemaCommandType.DropTable:
                Visit((DropTableCommand)schemaCommand);
                break;

            case SchemaCommandType.SqlStatement:
                Visit((SqlStatementCommand)schemaCommand);
                break;

            case SchemaCommandType.CreateForeignKey:
                Visit((CreateForeignKeyCommand)schemaCommand);
                break;

            case SchemaCommandType.DropForeignKey:
                Visit((DropForeignKeyCommand)schemaCommand);
                break;
            }
        }
 public void Visit(ISchemaBuilderCommand command) {
 }
Ejemplo n.º 4
0
 private void Run(ISchemaBuilderCommand command)
 {
     _interpreter.Visit(command);
 }
Ejemplo n.º 5
0
 private void Run(ISchemaBuilderCommand command) {
     _interpreter.Visit(command);
 }
Ejemplo n.º 6
0
 public static IEnumerable <string> CreateSql(this ISchemaBuilder builder, ISchemaBuilderCommand command)
 {
     return(builder.CreateSql(new[] { command }));
 }
Ejemplo n.º 7
0
 public void Visit(ISchemaBuilderCommand command)
 {
 }
Ejemplo n.º 8
0
 public static IEnumerable<string> CreateSql(this ISchemaBuilder builder, ISchemaBuilderCommand command)
 {
     return builder.CreateSql(new[] { command });
 }