- 优化 非 join 的多表查询的 SQL 格式;

This commit is contained in:
2881099
2024-12-20 17:23:24 +08:00
parent bafafe1387
commit 67ac72cd08
27 changed files with 342 additions and 29 deletions

View File

@@ -40,7 +40,7 @@ namespace FreeSql.QuestDb.Curd
sb.Append(_select);
if (_distinct) sb.Append("DISTINCT ");
sb.Append(field).Append(" \r\nFROM ");
var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From).ToArray();
var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent).ToArray();
var tbsfrom = _tables.Where(a => a.Type == SelectTableInfoType.From).ToArray();
for (var a = 0; a < tbsfrom.Length; a++)
{