예제 #1
0
 public CreateTableBuilder(IAccessDb 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);
 }
예제 #2
0
        public CreateTableBuilder(IAccessDb 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;
        }