mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-23 22:11:36 +08:00
Update unit test
This commit is contained in:
parent
61ac948bae
commit
763b89de45
@ -88,6 +88,22 @@ namespace OrmTest
|
|||||||
{
|
{
|
||||||
throw new Exception("unit error");
|
throw new Exception("unit error");
|
||||||
}
|
}
|
||||||
|
var sq2 = db.QueryableWithAttr<KingJsonTest>()
|
||||||
|
.LeftJoin<KingTree>((t, j) => t.Id == j.Id)
|
||||||
|
.Where((t, j) => t.CreateTime == null || j.ParentId == 1)
|
||||||
|
.Select((t, j) => new KingOutPut() { }, true)
|
||||||
|
.ToSqlString();
|
||||||
|
var sql3 = "SELECT \"T\".\"CREATE_TIME\" AS \"CREATETIME\" ,\"J\".\"PARENTID\" AS \"PARENTID\" FROM \"KING_JSON_TEST\" \"T\" Left JOIN HGT.\"KINGTREE\" \"J\" ON ( \"T\".\"ID\" = \"J\".\"ID\" ) WHERE (( \"T\".\"CREATE_TIME\" IS NULL ) OR ( \"J\".\"PARENTID\" = 1 ))";
|
||||||
|
if (sq2 != sql3)
|
||||||
|
{
|
||||||
|
throw new Exception("unit error");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
public class KingOutPut
|
||||||
|
{
|
||||||
|
public DateTime CreateTime { get; set; }
|
||||||
|
public int ParentId { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
//Json字段实体
|
//Json字段实体
|
||||||
|
Loading…
Reference in New Issue
Block a user