- 优化 RawJoin 支持 FULL JOIN 等自定义联表映射;

This commit is contained in:
2881099
2022-05-18 10:45:29 +08:00
parent 766c5e97d3
commit 173f75f0a6
23 changed files with 83 additions and 24 deletions

View File

@ -271,7 +271,7 @@ namespace base_entity
if (CommandTimeoutCascade._asyncLocalTimeout.Value > 0)
e.Command.CommandTimeout = CommandTimeoutCascade._asyncLocalTimeout.Value;
};
using (new CommandTimeoutCascade(1000))
{
fsql.Select<Order>().ToList();
@ -280,6 +280,16 @@ namespace base_entity
}
var sql1 = fsql.Select<User1, UserGroup>()
.RawJoin("FULL JOIN UserGroup b ON b.id = a.GroupId")
.Where((a, b) => a.IsDeleted == false)
.ToSql((a, b) => new
{
user = a, group = b
});
sql1 = sql1.Replace("INNER JOIN ", "FULL JOIN ");
fsql.UseJsonMap();