public static ModifiableSqlDB ModifiableMySql(string connString, ITypedDBAnalyzer taxonomy = null) { var analyzer = new MySqlAnalyzer(connString); var modifier = new MySqlModifier(connString, analyzer, taxonomy); var db = new MySqlDB(connString, analyzer, false); return new ModifiableSqlDB(db, modifier); }
public void CreateTable() { var mod = new MySqlModifier(_connStr, new MySqlAnalyzer(_connStr)); var cols = new Dictionary<string, SqlColumnType>(); cols.Add("FoosumId", new SqlColumnType(System.Data.SqlDbType.Int, false)); cols.Add("Name", new SqlColumnType(System.Data.SqlDbType.NVarChar, true, 42)); cols.Add("IsReal", new SqlColumnType(System.Data.SqlDbType.Bit, false)); mod.CreateTable("Foosum", cols); Assert.True(mod.Analyzer.TableExists("Foosum")); mod.DropTable("Foosum"); }