mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-19 04:18:16 +08:00
- 优化 pgsql jsonb 映射,支持 List,mysql limit in 子查询;
This commit is contained in:
@ -995,6 +995,14 @@ FROM ""tb_topic"" a
|
||||
WHERE ((((a.""id"")::text) in (SELECT b.""title""
|
||||
FROM ""tb_topic"" 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_topic"" a
|
||||
WHERE ((((a.""id"")::text) in (SELECT b.""title""
|
||||
FROM ""tb_topic"" b
|
||||
limit 10)))", 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