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); }
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); }
public void TestUnion() { var result = SqlUnion <One> .Union(Sql <One> .SelectAllByCondition + (condition > "oid").Full, "table1", "table2", "table3"); }