예제 #1
0
        public void TestUnionCondition1()
        {
            SqlPackage <Student>   package   = new SqlPackage <Student>();
            SqlCondition <Student> condition = new SqlCondition <Student>();
            var result = SqlUnion <Student> .Union(Sql <Student> .SelectAllByCondition + (condition > "Sid").Full, "table1", "table2", "table3");

            Assert.Equal("SELECT * FROM `table1` WHERE Sid > @Sid UNION SELECT * FROM `table2` WHERE Sid > @Sid UNION SELECT * FROM `table3` WHERE Sid > @Sid", result);
        }
예제 #2
0
        public void TestUnionCondition2()
        {
            SqlPackage <Student>   package   = new SqlPackage <Student>();
            SqlCondition <Student> condition = new SqlCondition <Student>();
            var result = SqlUnion <Student> .Union(Sql <Student> .SelectAllByCondition + (condition > "Sid").Full);

            Assert.Equal("SELECT * FROM `1` WHERE Sid > @Sid", result);
        }
예제 #3
0
 public void TestUnion()
 {
     var result = SqlUnion <One> .Union(Sql <One> .SelectAllByCondition + (condition > "oid").Full, "table1", "table2", "table3");
 }