Example #1
0
 public void GetFieldTypes()
 {
     var ana = new SqlAnalyzer(Config.TestDBConnectionString);
     var fields = ana.GetFieldTypes("Person");
     Assert.AreEqual("([Age,int NULL],[FirstName,nvarchar(50) NULL],[LastName,nvarchar(50) NULL],[PersonId,int NOT NULL])",
         fields.Print());
 }
Example #2
0
 public void GetFieldTypesFromView()
 {
     var ana = new SqlAnalyzer(connStr);
     var fields = ana.GetFieldTypes("ID_NUMView");
     Assert.AreEqual("([Age,int NULL],[FirstName,nvarchar(50) NULL],[ID_NUM,int NOT NULL],[LastName,nvarchar(50) NULL],[PersonId,int NOT NULL])",
         fields.Print());
 }
Example #3
0
 public static ModifiableSqlDB ModifiableSql2005(string connString, ITypedDBAnalyzer taxonomy = null)
 {
     var analyzer = new SqlAnalyzer(connString);
     var modifier = new SqlModifier(connString, analyzer, taxonomy);
     var db = new SqlDB(connString, analyzer, false);
     return new ModifiableSqlDB(db, modifier);
 }
Example #4
0
 public AbstractSqlReadWrite(string connectionString, SqlAnalyzer analyzer, bool strictTables = true)
 {
     SqlAnalyzer = analyzer;
     ConnectionString = connectionString;
     StrictTables = strictTables;
 }
Example #5
0
 public MySqlModifier(string connectionString, SqlAnalyzer analyzer, ITypedDBAnalyzer taxonomy = null)
     : base(connectionString, analyzer, taxonomy)
 {
 }
Example #6
0
 public MySqlDB(string connectionString, SqlAnalyzer analyzer, bool strictTables = true)
     : base(connectionString, analyzer, strictTables)
 { }
Example #7
0
 public void TableExistsFindsViews()
 {
     var ana = new SqlAnalyzer(connStr);
     Assert.True(ana.TableExists("ID_NUMView"));
 }
Example #8
0
 public void TableExists()
 {
     var ana = new SqlAnalyzer(connStr);
     Assert.True(ana.TableExists("Person"));
 }
Example #9
0
 public void GetFieldsFromView()
 {
     var ana = new SqlAnalyzer(connStr);
     var fields = ana.GetFields("ID_NUMView");
     Assert.AreEqual("(ID_NUM,PersonId,FirstName,LastName,Age)", fields.Print());
 }
Example #10
0
 public void GetFields()
 {
     var ana = new SqlAnalyzer(connStr);
     var fields = ana.GetFields("Person");
     Assert.AreEqual("(PersonId,FirstName,LastName,Age)", fields.Print());
 }
Example #11
0
 public SqlModifier(string connectionString, SqlAnalyzer analyzer, ITypedDBAnalyzer taxonomy = null)
 {
     SqlAnalyzer = analyzer;
     _connectionString = connectionString;
     Taxonomy = taxonomy;
 }
Example #12
0
 public void TableExistsFindsViews()
 {
     var ana = new SqlAnalyzer(Config.TestDBConnectionString);
     Assert.True(ana.TableExists("ID_NUMView"));
 }
Example #13
0
 public bool TableExists(string table)
 {
     var ana = new SqlAnalyzer(Config.TestDBConnectionString);
     return ana.TableExists(table);
 }
Example #14
0
 public string GetPrimaryKeys(string table)
 {
     var ana = new SqlAnalyzer(Config.TestDBConnectionString);
     return ana.GetPrimaryKeys(table).Print();
 }
Example #15
0
 public string GetFields(string table)
 {
     var ana = new SqlAnalyzer(Config.TestDBConnectionString);
     var fields = ana.GetFields(table);
     return fields.Print();
 }
Example #16
0
 public string GetAutoNumberKey(string table)
 {
     var ana = new SqlAnalyzer(Config.TestDBConnectionString);
     return ana.GetAutoNumberKey(table);
 }