Пример #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());
 }
Пример #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());
 }
Пример #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);
 }
Пример #4
0
 public AbstractSqlReadWrite(string connectionString, SqlAnalyzer analyzer, bool strictTables = true)
 {
     SqlAnalyzer = analyzer;
     ConnectionString = connectionString;
     StrictTables = strictTables;
 }
Пример #5
0
 public MySqlModifier(string connectionString, SqlAnalyzer analyzer, ITypedDBAnalyzer taxonomy = null)
     : base(connectionString, analyzer, taxonomy)
 {
 }
Пример #6
0
 public MySqlDB(string connectionString, SqlAnalyzer analyzer, bool strictTables = true)
     : base(connectionString, analyzer, strictTables)
 { }
Пример #7
0
 public void TableExistsFindsViews()
 {
     var ana = new SqlAnalyzer(connStr);
     Assert.True(ana.TableExists("ID_NUMView"));
 }
Пример #8
0
 public void TableExists()
 {
     var ana = new SqlAnalyzer(connStr);
     Assert.True(ana.TableExists("Person"));
 }
Пример #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());
 }
Пример #10
0
 public void GetFields()
 {
     var ana = new SqlAnalyzer(connStr);
     var fields = ana.GetFields("Person");
     Assert.AreEqual("(PersonId,FirstName,LastName,Age)", fields.Print());
 }
Пример #11
0
 public SqlModifier(string connectionString, SqlAnalyzer analyzer, ITypedDBAnalyzer taxonomy = null)
 {
     SqlAnalyzer = analyzer;
     _connectionString = connectionString;
     Taxonomy = taxonomy;
 }
Пример #12
0
 public void TableExistsFindsViews()
 {
     var ana = new SqlAnalyzer(Config.TestDBConnectionString);
     Assert.True(ana.TableExists("ID_NUMView"));
 }
Пример #13
0
 public bool TableExists(string table)
 {
     var ana = new SqlAnalyzer(Config.TestDBConnectionString);
     return ana.TableExists(table);
 }
Пример #14
0
 public string GetPrimaryKeys(string table)
 {
     var ana = new SqlAnalyzer(Config.TestDBConnectionString);
     return ana.GetPrimaryKeys(table).Print();
 }
Пример #15
0
 public string GetFields(string table)
 {
     var ana = new SqlAnalyzer(Config.TestDBConnectionString);
     var fields = ana.GetFields(table);
     return fields.Print();
 }
Пример #16
0
 public string GetAutoNumberKey(string table)
 {
     var ana = new SqlAnalyzer(Config.TestDBConnectionString);
     return ana.GetAutoNumberKey(table);
 }