示例#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
文件: ConnectTo.cs 项目: badjer/Lasy
 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
文件: MySqlDB.cs 项目: badjer/Lasy
 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);
 }