mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-18 20:08:15 +08:00
- 优化 pgsql jsonb 映射,支持 List,mysql limit in 子查询;
This commit is contained in:
@ -933,6 +933,14 @@ FROM ""TB_TOPIC22"" a
|
||||
WHERE (((to_char(a.""ID"")) in (SELECT b.""TITLE""
|
||||
FROM ""TB_TOPIC22"" b)))", subquery);
|
||||
var subqueryList = select.Where(a => select.As("b").ToList(b => b.Title).Contains(a.Id.ToString())).ToList();
|
||||
|
||||
subquery = select.Where(a => select.As("b").Limit(10).ToList(b => b.Title).Contains(a.Id.ToString())).ToSql();
|
||||
Assert.Equal(@"SELECT a.""ID"", a.""CLICKS"", a.""TYPEGUID"", a.""TITLE"", a.""CREATETIME""
|
||||
FROM ""TB_TOPIC22"" a
|
||||
WHERE (((to_char(a.""ID"")) in (SELECT b.""TITLE""
|
||||
FROM ""TB_TOPIC22"" b
|
||||
WHERE ROWNUM < 11)))", subquery);
|
||||
subqueryList = select.Where(a => select.As("b").Limit(10).ToList(b => b.Title).Contains(a.Id.ToString())).ToList();
|
||||
}
|
||||
[Fact]
|
||||
public void As()
|
||||
|
Reference in New Issue
Block a user