Ejemplo n.º 1
0
 public CreateTableBuilder(DbConnection db, IGenerateDDL generator, TableSchema schema)
 {
     _db = db;
     _generator = generator;
     _table = schema;
     _columns = new ColumnsCreator(Table);
     _constraints = new ConstraintsCreator(Table.Constraints);
     _indexes = new IndexCreator(Table.Indexes);
 }
Ejemplo n.º 2
0
        public CreateTableBuilder(DbConnection db, IGenerateDDL generator, string tableName, IfTableExists option)
        {
            _db = db;
            _generator = generator;
            tableName.MustNotBeEmpty();
            _table = new TableSchema(tableName);
            _columns = new ColumnsCreator(Table);
            _constraints = new ConstraintsCreator(Table.Constraints);
            _indexes = new IndexCreator(Table.Indexes);

            Table.Name = tableName;
            Table.CreationOption = option;
        }