From 963b1cc70b559d0bd4fa307a2b489faedf02ef1f Mon Sep 17 00:00:00 2001
From: 2881099 <2881099@qq.com>
Date: Sat, 13 Dec 2025 19:27:49 +0800
Subject: [PATCH] =?UTF-8?q?=20-=20=E4=BF=AE=E5=A4=8D=20WithoutJson=20?=
=?UTF-8?q?=E5=92=8C=20HzyTuple=20t1...t3=20=E7=9A=84=E5=86=B2=E7=AA=81?=
=?UTF-8?q?=E9=97=AE=E9=A2=98=EF=BC=9B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
FreeSql/FreeSql.xml | 123 +++++++++
.../SelectProvider/Select0Provider.cs | 4 +-
.../SelectProvider/Select1Provider2`16.cs | 240 +++++++++---------
.../T4Temp/Select1Provider2`16.tt | 3 +-
FreeSql/Internal/Model/SelectTableInfo.cs | 2 +-
.../Curd/ClickHouseSelect.cs | 3 +-
.../Curd/CustomSelect.cs | 3 +-
.../MySql/Curd/CustomMySqlSelect.cs | 3 +-
.../Oracle/Curd/CustomOracleSelect.cs | 3 +-
.../PostgreSQL/Curd/CustomPostgreSQLSelect.cs | 3 +-
.../SqlServer/Curd/CustomSqlServerSelect.cs | 6 +-
.../Curd/DamengSelect.cs | 3 +-
.../Curd/DuckdbSelect.cs | 3 +-
.../Curd/FirebirdSelect.cs | 3 +-
.../Curd/GBaseSelect.cs | 3 +-
.../Curd/KingbaseESSelect.cs | 3 +-
.../Curd/MsAccessSelect.cs | 3 +-
.../Curd/MySqlSelect.cs | 3 +-
.../Default/Curd/OdbcSelect.cs | 3 +-
.../MySql/Curd/OdbcMySqlSelect.cs | 3 +-
.../Oracle/Curd/OdbcOracleSelect.cs | 3 +-
.../PostgreSQL/Curd/OdbcPostgreSQLSelect.cs | 3 +-
.../SqlServer/Curd/OdbcSqlServerSelect.cs | 6 +-
.../Curd/OracleSelect.cs | 3 +-
.../Curd/PostgreSQLSelect.cs | 3 +-
.../Curd/QuestDbSelect.cs | 3 +-
.../Curd/ShenTongSelect.cs | 3 +-
.../Curd/SqlServerSelect.cs | 6 +-
.../Curd/SqliteSelect.cs | 3 +-
.../Curd/TDengineSelect.cs | 3 +-
.../FreeSql.Provider.Xugu/Curd/XuguSelect.cs | 3 +-
31 files changed, 307 insertions(+), 152 deletions(-)
diff --git a/FreeSql/FreeSql.xml b/FreeSql/FreeSql.xml
index 1f4f5d651..c41755e18 100644
--- a/FreeSql/FreeSql.xml
+++ b/FreeSql/FreeSql.xml
@@ -6529,3 +6529,126 @@
+
+
+
+
+ 插入数据,传入实体集合
+
+
+
+
+
+
+
+ 插入数据,传入实体集合
+
+
+
+
+
+
+
+ 插入或更新数据,此功能依赖数据库特性(低版本可能不支持),参考如下:
+ MySql 5.6+: on duplicate key update
+ PostgreSQL 9.4+: on conflict do update
+ SqlServer 2008+: merge into
+ Oracle 11+: merge into
+ Sqlite: replace into
+ DuckDB: on conflict do update
+ 达梦: merge into
+ 人大金仓:on conflict do update
+ 神通:merge into
+ MsAccess:不支持
+ 注意区别:FreeSql.Repository 仓储也有 InsertOrUpdate 方法(不依赖数据库特性)
+
+
+
+
+
+
+ 修改数据
+
+
+
+
+
+
+ 修改数据,传入动态条件,如:主键值 | new[]{主键值1,主键值2} | TEntity1 | new[]{TEntity1,TEntity2} | new{id=1}
+
+
+ 主键值、主键值集合、实体、实体集合、匿名对象、匿名对象集合
+
+
+
+
+ 查询数据
+
+
+
+
+
+
+ 查询数据,传入动态条件,如:主键值 | new[]{主键值1,主键值2} | TEntity1 | new[]{TEntity1,TEntity2} | new{id=1}
+
+
+ 主键值、主键值集合、实体、实体集合、匿名对象、匿名对象集合
+
+
+
+
+ 删除数据
+
+
+
+
+
+
+ 删除数据,传入动态条件,如:主键值 | new[]{主键值1,主键值2} | TEntity1 | new[]{TEntity1,TEntity2} | new{id=1}
+
+
+ 主键值、主键值集合、实体、实体集合、匿名对象、匿名对象集合
+
+
+
+
+ 开启事务(不支持异步)
+ v1.5.0 关闭了线程事务超时自动提交的机制
+
+ 事务体 () => {}
+
+
+
+ 开启事务(不支持异步)
+ v1.5.0 关闭了线程事务超时自动提交的机制
+
+
+ 事务体 () => {}
+
+
+
+ 数据库访问对象
+
+
+
+
+ 所有拦截方法都在这里
+
+
+
+
+ CodeFirst 模式开发相关方法
+
+
+
+
+ DbFirst 模式开发相关方法
+
+
+
+
+ 全局过滤设置,可默认附加为 Select/Update/Delete 条件
+
+
+
+
diff --git a/FreeSql/Internal/CommonProvider/SelectProvider/Select0Provider.cs b/FreeSql/Internal/CommonProvider/SelectProvider/Select0Provider.cs
index 3812675ec..c0ee04d5b 100644
--- a/FreeSql/Internal/CommonProvider/SelectProvider/Select0Provider.cs
+++ b/FreeSql/Internal/CommonProvider/SelectProvider/Select0Provider.cs
@@ -1001,7 +1001,8 @@ namespace FreeSql.Internal.CommonProvider
}
return new string[] { tb.Table.DbName };
}
- var tbnames = _tables.Where(a => a.Type != SelectTableInfoType.Parent).GroupBy(a => a.Table.Type).Select(g => _tables.Where(a => a.Table.Type == g.Key).FirstOrDefault()).Select(a => new { Tb = a, Names = LocalGetTableNames(a) }).ToList();
+ var tbnames = _tables.Where(a => a.Type != SelectTableInfoType.Parent && a.Type != SelectTableInfoType.WithoutJoin)
+ .GroupBy(a => a.Table.Type).Select(g => _tables.Where(a => a.Table.Type == g.Key).FirstOrDefault()).Select(a => new { Tb = a, Names = LocalGetTableNames(a) }).ToList();
if (DateTimeAsTableImplStart != null && DateTimeAsTableImplEnd != null && tbnames.Where(a => a.Names.Length > 1).Count() > 1)
{
tbnames = tbnames.Select(a => new { a.Tb, Names = a.Tb.Table.AsTableImpl?.GetTableNamesByColumnValueRange(DateTimeAsTableImplStart, DateTimeAsTableImplEnd) ?? a.Names }).ToList();
@@ -1060,6 +1061,7 @@ namespace FreeSql.Internal.CommonProvider
foreach (var tb in _tables)
{
if (tb.Type == SelectTableInfoType.Parent) continue;
+ if (tb.Type == SelectTableInfoType.WithoutJoin) continue;
if (dict.ContainsKey(tb.Table.Type)) continue;
var tbname = _commonUtils.GetEntityTableAopName(tb.Table, true);
var newname = tr?.Invoke(tb.Table.Type, tbname);
diff --git a/FreeSql/Internal/CommonProvider/SelectProvider/Select1Provider2`16.cs b/FreeSql/Internal/CommonProvider/SelectProvider/Select1Provider2`16.cs
index ada7e81af..45539f85f 100644
--- a/FreeSql/Internal/CommonProvider/SelectProvider/Select1Provider2`16.cs
+++ b/FreeSql/Internal/CommonProvider/SelectProvider/Select1Provider2`16.cs
@@ -25,7 +25,7 @@ namespace FreeSql.Internal.CommonProvider
ISelect ISelect.WithoutJoin(bool t2)
{
- if (t2) _tables[1].Type = SelectTableInfoType.Parent;
+ if (t2) _tables[1].Type = SelectTableInfoType.WithoutJoin;
return this;
}
@@ -530,8 +530,8 @@ namespace FreeSql.Internal.CommonProvider
ISelect ISelect.WithoutJoin(bool t2, bool t3)
{
- if (t2) _tables[1].Type = SelectTableInfoType.Parent;
- if (t3) _tables[2].Type = SelectTableInfoType.Parent;
+ if (t2) _tables[1].Type = SelectTableInfoType.WithoutJoin;
+ if (t3) _tables[2].Type = SelectTableInfoType.WithoutJoin;
return this;
}
@@ -1039,9 +1039,9 @@ namespace FreeSql.Internal.CommonProvider
ISelect ISelect.WithoutJoin(bool t2, bool t3, bool t4)
{
- if (t2) _tables[1].Type = SelectTableInfoType.Parent;
- if (t3) _tables[2].Type = SelectTableInfoType.Parent;
- if (t4) _tables[3].Type = SelectTableInfoType.Parent;
+ if (t2) _tables[1].Type = SelectTableInfoType.WithoutJoin;
+ if (t3) _tables[2].Type = SelectTableInfoType.WithoutJoin;
+ if (t4) _tables[3].Type = SelectTableInfoType.WithoutJoin;
return this;
}
@@ -1552,10 +1552,10 @@ namespace FreeSql.Internal.CommonProvider
ISelect ISelect.WithoutJoin(bool t2, bool t3, bool t4, bool t5)
{
- if (t2) _tables[1].Type = SelectTableInfoType.Parent;
- if (t3) _tables[2].Type = SelectTableInfoType.Parent;
- if (t4) _tables[3].Type = SelectTableInfoType.Parent;
- if (t5) _tables[4].Type = SelectTableInfoType.Parent;
+ if (t2) _tables[1].Type = SelectTableInfoType.WithoutJoin;
+ if (t3) _tables[2].Type = SelectTableInfoType.WithoutJoin;
+ if (t4) _tables[3].Type = SelectTableInfoType.WithoutJoin;
+ if (t5) _tables[4].Type = SelectTableInfoType.WithoutJoin;
return this;
}
@@ -2069,11 +2069,11 @@ namespace FreeSql.Internal.CommonProvider
ISelect ISelect.WithoutJoin(bool t2, bool t3, bool t4, bool t5, bool t6)
{
- if (t2) _tables[1].Type = SelectTableInfoType.Parent;
- if (t3) _tables[2].Type = SelectTableInfoType.Parent;
- if (t4) _tables[3].Type = SelectTableInfoType.Parent;
- if (t5) _tables[4].Type = SelectTableInfoType.Parent;
- if (t6) _tables[5].Type = SelectTableInfoType.Parent;
+ if (t2) _tables[1].Type = SelectTableInfoType.WithoutJoin;
+ if (t3) _tables[2].Type = SelectTableInfoType.WithoutJoin;
+ if (t4) _tables[3].Type = SelectTableInfoType.WithoutJoin;
+ if (t5) _tables[4].Type = SelectTableInfoType.WithoutJoin;
+ if (t6) _tables[5].Type = SelectTableInfoType.WithoutJoin;
return this;
}
@@ -2590,12 +2590,12 @@ namespace FreeSql.Internal.CommonProvider
ISelect ISelect.WithoutJoin(bool t2, bool t3, bool t4, bool t5, bool t6, bool t7)
{
- if (t2) _tables[1].Type = SelectTableInfoType.Parent;
- if (t3) _tables[2].Type = SelectTableInfoType.Parent;
- if (t4) _tables[3].Type = SelectTableInfoType.Parent;
- if (t5) _tables[4].Type = SelectTableInfoType.Parent;
- if (t6) _tables[5].Type = SelectTableInfoType.Parent;
- if (t7) _tables[6].Type = SelectTableInfoType.Parent;
+ if (t2) _tables[1].Type = SelectTableInfoType.WithoutJoin;
+ if (t3) _tables[2].Type = SelectTableInfoType.WithoutJoin;
+ if (t4) _tables[3].Type = SelectTableInfoType.WithoutJoin;
+ if (t5) _tables[4].Type = SelectTableInfoType.WithoutJoin;
+ if (t6) _tables[5].Type = SelectTableInfoType.WithoutJoin;
+ if (t7) _tables[6].Type = SelectTableInfoType.WithoutJoin;
return this;
}
@@ -3115,13 +3115,13 @@ namespace FreeSql.Internal.CommonProvider
ISelect ISelect.WithoutJoin(bool t2, bool t3, bool t4, bool t5, bool t6, bool t7, bool t8)
{
- if (t2) _tables[1].Type = SelectTableInfoType.Parent;
- if (t3) _tables[2].Type = SelectTableInfoType.Parent;
- if (t4) _tables[3].Type = SelectTableInfoType.Parent;
- if (t5) _tables[4].Type = SelectTableInfoType.Parent;
- if (t6) _tables[5].Type = SelectTableInfoType.Parent;
- if (t7) _tables[6].Type = SelectTableInfoType.Parent;
- if (t8) _tables[7].Type = SelectTableInfoType.Parent;
+ if (t2) _tables[1].Type = SelectTableInfoType.WithoutJoin;
+ if (t3) _tables[2].Type = SelectTableInfoType.WithoutJoin;
+ if (t4) _tables[3].Type = SelectTableInfoType.WithoutJoin;
+ if (t5) _tables[4].Type = SelectTableInfoType.WithoutJoin;
+ if (t6) _tables[5].Type = SelectTableInfoType.WithoutJoin;
+ if (t7) _tables[6].Type = SelectTableInfoType.WithoutJoin;
+ if (t8) _tables[7].Type = SelectTableInfoType.WithoutJoin;
return this;
}
@@ -3644,14 +3644,14 @@ namespace FreeSql.Internal.CommonProvider
ISelect ISelect.WithoutJoin(bool t2, bool t3, bool t4, bool t5, bool t6, bool t7, bool t8, bool t9)
{
- if (t2) _tables[1].Type = SelectTableInfoType.Parent;
- if (t3) _tables[2].Type = SelectTableInfoType.Parent;
- if (t4) _tables[3].Type = SelectTableInfoType.Parent;
- if (t5) _tables[4].Type = SelectTableInfoType.Parent;
- if (t6) _tables[5].Type = SelectTableInfoType.Parent;
- if (t7) _tables[6].Type = SelectTableInfoType.Parent;
- if (t8) _tables[7].Type = SelectTableInfoType.Parent;
- if (t9) _tables[8].Type = SelectTableInfoType.Parent;
+ if (t2) _tables[1].Type = SelectTableInfoType.WithoutJoin;
+ if (t3) _tables[2].Type = SelectTableInfoType.WithoutJoin;
+ if (t4) _tables[3].Type = SelectTableInfoType.WithoutJoin;
+ if (t5) _tables[4].Type = SelectTableInfoType.WithoutJoin;
+ if (t6) _tables[5].Type = SelectTableInfoType.WithoutJoin;
+ if (t7) _tables[6].Type = SelectTableInfoType.WithoutJoin;
+ if (t8) _tables[7].Type = SelectTableInfoType.WithoutJoin;
+ if (t9) _tables[8].Type = SelectTableInfoType.WithoutJoin;
return this;
}
@@ -4177,15 +4177,15 @@ namespace FreeSql.Internal.CommonProvider
ISelect ISelect.WithoutJoin(bool t2, bool t3, bool t4, bool t5, bool t6, bool t7, bool t8, bool t9, bool t10)
{
- if (t2) _tables[1].Type = SelectTableInfoType.Parent;
- if (t3) _tables[2].Type = SelectTableInfoType.Parent;
- if (t4) _tables[3].Type = SelectTableInfoType.Parent;
- if (t5) _tables[4].Type = SelectTableInfoType.Parent;
- if (t6) _tables[5].Type = SelectTableInfoType.Parent;
- if (t7) _tables[6].Type = SelectTableInfoType.Parent;
- if (t8) _tables[7].Type = SelectTableInfoType.Parent;
- if (t9) _tables[8].Type = SelectTableInfoType.Parent;
- if (t10) _tables[9].Type = SelectTableInfoType.Parent;
+ if (t2) _tables[1].Type = SelectTableInfoType.WithoutJoin;
+ if (t3) _tables[2].Type = SelectTableInfoType.WithoutJoin;
+ if (t4) _tables[3].Type = SelectTableInfoType.WithoutJoin;
+ if (t5) _tables[4].Type = SelectTableInfoType.WithoutJoin;
+ if (t6) _tables[5].Type = SelectTableInfoType.WithoutJoin;
+ if (t7) _tables[6].Type = SelectTableInfoType.WithoutJoin;
+ if (t8) _tables[7].Type = SelectTableInfoType.WithoutJoin;
+ if (t9) _tables[8].Type = SelectTableInfoType.WithoutJoin;
+ if (t10) _tables[9].Type = SelectTableInfoType.WithoutJoin;
return this;
}
@@ -4714,16 +4714,16 @@ namespace FreeSql.Internal.CommonProvider
ISelect ISelect.WithoutJoin(bool t2, bool t3, bool t4, bool t5, bool t6, bool t7, bool t8, bool t9, bool t10, bool t11)
{
- if (t2) _tables[1].Type = SelectTableInfoType.Parent;
- if (t3) _tables[2].Type = SelectTableInfoType.Parent;
- if (t4) _tables[3].Type = SelectTableInfoType.Parent;
- if (t5) _tables[4].Type = SelectTableInfoType.Parent;
- if (t6) _tables[5].Type = SelectTableInfoType.Parent;
- if (t7) _tables[6].Type = SelectTableInfoType.Parent;
- if (t8) _tables[7].Type = SelectTableInfoType.Parent;
- if (t9) _tables[8].Type = SelectTableInfoType.Parent;
- if (t10) _tables[9].Type = SelectTableInfoType.Parent;
- if (t11) _tables[10].Type = SelectTableInfoType.Parent;
+ if (t2) _tables[1].Type = SelectTableInfoType.WithoutJoin;
+ if (t3) _tables[2].Type = SelectTableInfoType.WithoutJoin;
+ if (t4) _tables[3].Type = SelectTableInfoType.WithoutJoin;
+ if (t5) _tables[4].Type = SelectTableInfoType.WithoutJoin;
+ if (t6) _tables[5].Type = SelectTableInfoType.WithoutJoin;
+ if (t7) _tables[6].Type = SelectTableInfoType.WithoutJoin;
+ if (t8) _tables[7].Type = SelectTableInfoType.WithoutJoin;
+ if (t9) _tables[8].Type = SelectTableInfoType.WithoutJoin;
+ if (t10) _tables[9].Type = SelectTableInfoType.WithoutJoin;
+ if (t11) _tables[10].Type = SelectTableInfoType.WithoutJoin;
return this;
}
@@ -5255,17 +5255,17 @@ namespace FreeSql.Internal.CommonProvider
ISelect ISelect.WithoutJoin(bool t2, bool t3, bool t4, bool t5, bool t6, bool t7, bool t8, bool t9, bool t10, bool t11, bool t12)
{
- if (t2) _tables[1].Type = SelectTableInfoType.Parent;
- if (t3) _tables[2].Type = SelectTableInfoType.Parent;
- if (t4) _tables[3].Type = SelectTableInfoType.Parent;
- if (t5) _tables[4].Type = SelectTableInfoType.Parent;
- if (t6) _tables[5].Type = SelectTableInfoType.Parent;
- if (t7) _tables[6].Type = SelectTableInfoType.Parent;
- if (t8) _tables[7].Type = SelectTableInfoType.Parent;
- if (t9) _tables[8].Type = SelectTableInfoType.Parent;
- if (t10) _tables[9].Type = SelectTableInfoType.Parent;
- if (t11) _tables[10].Type = SelectTableInfoType.Parent;
- if (t12) _tables[11].Type = SelectTableInfoType.Parent;
+ if (t2) _tables[1].Type = SelectTableInfoType.WithoutJoin;
+ if (t3) _tables[2].Type = SelectTableInfoType.WithoutJoin;
+ if (t4) _tables[3].Type = SelectTableInfoType.WithoutJoin;
+ if (t5) _tables[4].Type = SelectTableInfoType.WithoutJoin;
+ if (t6) _tables[5].Type = SelectTableInfoType.WithoutJoin;
+ if (t7) _tables[6].Type = SelectTableInfoType.WithoutJoin;
+ if (t8) _tables[7].Type = SelectTableInfoType.WithoutJoin;
+ if (t9) _tables[8].Type = SelectTableInfoType.WithoutJoin;
+ if (t10) _tables[9].Type = SelectTableInfoType.WithoutJoin;
+ if (t11) _tables[10].Type = SelectTableInfoType.WithoutJoin;
+ if (t12) _tables[11].Type = SelectTableInfoType.WithoutJoin;
return this;
}
@@ -5800,18 +5800,18 @@ namespace FreeSql.Internal.CommonProvider
ISelect ISelect.WithoutJoin(bool t2, bool t3, bool t4, bool t5, bool t6, bool t7, bool t8, bool t9, bool t10, bool t11, bool t12, bool t13)
{
- if (t2) _tables[1].Type = SelectTableInfoType.Parent;
- if (t3) _tables[2].Type = SelectTableInfoType.Parent;
- if (t4) _tables[3].Type = SelectTableInfoType.Parent;
- if (t5) _tables[4].Type = SelectTableInfoType.Parent;
- if (t6) _tables[5].Type = SelectTableInfoType.Parent;
- if (t7) _tables[6].Type = SelectTableInfoType.Parent;
- if (t8) _tables[7].Type = SelectTableInfoType.Parent;
- if (t9) _tables[8].Type = SelectTableInfoType.Parent;
- if (t10) _tables[9].Type = SelectTableInfoType.Parent;
- if (t11) _tables[10].Type = SelectTableInfoType.Parent;
- if (t12) _tables[11].Type = SelectTableInfoType.Parent;
- if (t13) _tables[12].Type = SelectTableInfoType.Parent;
+ if (t2) _tables[1].Type = SelectTableInfoType.WithoutJoin;
+ if (t3) _tables[2].Type = SelectTableInfoType.WithoutJoin;
+ if (t4) _tables[3].Type = SelectTableInfoType.WithoutJoin;
+ if (t5) _tables[4].Type = SelectTableInfoType.WithoutJoin;
+ if (t6) _tables[5].Type = SelectTableInfoType.WithoutJoin;
+ if (t7) _tables[6].Type = SelectTableInfoType.WithoutJoin;
+ if (t8) _tables[7].Type = SelectTableInfoType.WithoutJoin;
+ if (t9) _tables[8].Type = SelectTableInfoType.WithoutJoin;
+ if (t10) _tables[9].Type = SelectTableInfoType.WithoutJoin;
+ if (t11) _tables[10].Type = SelectTableInfoType.WithoutJoin;
+ if (t12) _tables[11].Type = SelectTableInfoType.WithoutJoin;
+ if (t13) _tables[12].Type = SelectTableInfoType.WithoutJoin;
return this;
}
@@ -6349,19 +6349,19 @@ namespace FreeSql.Internal.CommonProvider
ISelect ISelect.WithoutJoin(bool t2, bool t3, bool t4, bool t5, bool t6, bool t7, bool t8, bool t9, bool t10, bool t11, bool t12, bool t13, bool t14)
{
- if (t2) _tables[1].Type = SelectTableInfoType.Parent;
- if (t3) _tables[2].Type = SelectTableInfoType.Parent;
- if (t4) _tables[3].Type = SelectTableInfoType.Parent;
- if (t5) _tables[4].Type = SelectTableInfoType.Parent;
- if (t6) _tables[5].Type = SelectTableInfoType.Parent;
- if (t7) _tables[6].Type = SelectTableInfoType.Parent;
- if (t8) _tables[7].Type = SelectTableInfoType.Parent;
- if (t9) _tables[8].Type = SelectTableInfoType.Parent;
- if (t10) _tables[9].Type = SelectTableInfoType.Parent;
- if (t11) _tables[10].Type = SelectTableInfoType.Parent;
- if (t12) _tables[11].Type = SelectTableInfoType.Parent;
- if (t13) _tables[12].Type = SelectTableInfoType.Parent;
- if (t14) _tables[13].Type = SelectTableInfoType.Parent;
+ if (t2) _tables[1].Type = SelectTableInfoType.WithoutJoin;
+ if (t3) _tables[2].Type = SelectTableInfoType.WithoutJoin;
+ if (t4) _tables[3].Type = SelectTableInfoType.WithoutJoin;
+ if (t5) _tables[4].Type = SelectTableInfoType.WithoutJoin;
+ if (t6) _tables[5].Type = SelectTableInfoType.WithoutJoin;
+ if (t7) _tables[6].Type = SelectTableInfoType.WithoutJoin;
+ if (t8) _tables[7].Type = SelectTableInfoType.WithoutJoin;
+ if (t9) _tables[8].Type = SelectTableInfoType.WithoutJoin;
+ if (t10) _tables[9].Type = SelectTableInfoType.WithoutJoin;
+ if (t11) _tables[10].Type = SelectTableInfoType.WithoutJoin;
+ if (t12) _tables[11].Type = SelectTableInfoType.WithoutJoin;
+ if (t13) _tables[12].Type = SelectTableInfoType.WithoutJoin;
+ if (t14) _tables[13].Type = SelectTableInfoType.WithoutJoin;
return this;
}
@@ -6902,20 +6902,20 @@ namespace FreeSql.Internal.CommonProvider
ISelect ISelect.WithoutJoin(bool t2, bool t3, bool t4, bool t5, bool t6, bool t7, bool t8, bool t9, bool t10, bool t11, bool t12, bool t13, bool t14, bool t15)
{
- if (t2) _tables[1].Type = SelectTableInfoType.Parent;
- if (t3) _tables[2].Type = SelectTableInfoType.Parent;
- if (t4) _tables[3].Type = SelectTableInfoType.Parent;
- if (t5) _tables[4].Type = SelectTableInfoType.Parent;
- if (t6) _tables[5].Type = SelectTableInfoType.Parent;
- if (t7) _tables[6].Type = SelectTableInfoType.Parent;
- if (t8) _tables[7].Type = SelectTableInfoType.Parent;
- if (t9) _tables[8].Type = SelectTableInfoType.Parent;
- if (t10) _tables[9].Type = SelectTableInfoType.Parent;
- if (t11) _tables[10].Type = SelectTableInfoType.Parent;
- if (t12) _tables[11].Type = SelectTableInfoType.Parent;
- if (t13) _tables[12].Type = SelectTableInfoType.Parent;
- if (t14) _tables[13].Type = SelectTableInfoType.Parent;
- if (t15) _tables[14].Type = SelectTableInfoType.Parent;
+ if (t2) _tables[1].Type = SelectTableInfoType.WithoutJoin;
+ if (t3) _tables[2].Type = SelectTableInfoType.WithoutJoin;
+ if (t4) _tables[3].Type = SelectTableInfoType.WithoutJoin;
+ if (t5) _tables[4].Type = SelectTableInfoType.WithoutJoin;
+ if (t6) _tables[5].Type = SelectTableInfoType.WithoutJoin;
+ if (t7) _tables[6].Type = SelectTableInfoType.WithoutJoin;
+ if (t8) _tables[7].Type = SelectTableInfoType.WithoutJoin;
+ if (t9) _tables[8].Type = SelectTableInfoType.WithoutJoin;
+ if (t10) _tables[9].Type = SelectTableInfoType.WithoutJoin;
+ if (t11) _tables[10].Type = SelectTableInfoType.WithoutJoin;
+ if (t12) _tables[11].Type = SelectTableInfoType.WithoutJoin;
+ if (t13) _tables[12].Type = SelectTableInfoType.WithoutJoin;
+ if (t14) _tables[13].Type = SelectTableInfoType.WithoutJoin;
+ if (t15) _tables[14].Type = SelectTableInfoType.WithoutJoin;
return this;
}
@@ -7459,21 +7459,21 @@ namespace FreeSql.Internal.CommonProvider
ISelect ISelect.WithoutJoin(bool t2, bool t3, bool t4, bool t5, bool t6, bool t7, bool t8, bool t9, bool t10, bool t11, bool t12, bool t13, bool t14, bool t15, bool t16)
{
- if (t2) _tables[1].Type = SelectTableInfoType.Parent;
- if (t3) _tables[2].Type = SelectTableInfoType.Parent;
- if (t4) _tables[3].Type = SelectTableInfoType.Parent;
- if (t5) _tables[4].Type = SelectTableInfoType.Parent;
- if (t6) _tables[5].Type = SelectTableInfoType.Parent;
- if (t7) _tables[6].Type = SelectTableInfoType.Parent;
- if (t8) _tables[7].Type = SelectTableInfoType.Parent;
- if (t9) _tables[8].Type = SelectTableInfoType.Parent;
- if (t10) _tables[9].Type = SelectTableInfoType.Parent;
- if (t11) _tables[10].Type = SelectTableInfoType.Parent;
- if (t12) _tables[11].Type = SelectTableInfoType.Parent;
- if (t13) _tables[12].Type = SelectTableInfoType.Parent;
- if (t14) _tables[13].Type = SelectTableInfoType.Parent;
- if (t15) _tables[14].Type = SelectTableInfoType.Parent;
- if (t16) _tables[15].Type = SelectTableInfoType.Parent;
+ if (t2) _tables[1].Type = SelectTableInfoType.WithoutJoin;
+ if (t3) _tables[2].Type = SelectTableInfoType.WithoutJoin;
+ if (t4) _tables[3].Type = SelectTableInfoType.WithoutJoin;
+ if (t5) _tables[4].Type = SelectTableInfoType.WithoutJoin;
+ if (t6) _tables[5].Type = SelectTableInfoType.WithoutJoin;
+ if (t7) _tables[6].Type = SelectTableInfoType.WithoutJoin;
+ if (t8) _tables[7].Type = SelectTableInfoType.WithoutJoin;
+ if (t9) _tables[8].Type = SelectTableInfoType.WithoutJoin;
+ if (t10) _tables[9].Type = SelectTableInfoType.WithoutJoin;
+ if (t11) _tables[10].Type = SelectTableInfoType.WithoutJoin;
+ if (t12) _tables[11].Type = SelectTableInfoType.WithoutJoin;
+ if (t13) _tables[12].Type = SelectTableInfoType.WithoutJoin;
+ if (t14) _tables[13].Type = SelectTableInfoType.WithoutJoin;
+ if (t15) _tables[14].Type = SelectTableInfoType.WithoutJoin;
+ if (t16) _tables[15].Type = SelectTableInfoType.WithoutJoin;
return this;
}
diff --git a/FreeSql/Internal/CommonProvider/SelectProvider/T4Temp/Select1Provider2`16.tt b/FreeSql/Internal/CommonProvider/SelectProvider/T4Temp/Select1Provider2`16.tt
index a4b1b7a10..5132e74ea 100644
--- a/FreeSql/Internal/CommonProvider/SelectProvider/T4Temp/Select1Provider2`16.tt
+++ b/FreeSql/Internal/CommonProvider/SelectProvider/T4Temp/Select1Provider2`16.tt
@@ -82,7 +82,8 @@ namespace FreeSql.Internal.CommonProvider
{
string paramName = "t" + (paramIndex + 2);
#>
- if (<#=paramName#>) _tables[<#=(paramIndex+1)#>].Type = SelectTableInfoType.Parent;<# } #>
+ if (<#=paramName#>) _tables[<#=(paramIndex+1)#>].Type = SelectTableInfoType.WithoutJoin;
+<# } #>
return this;
}
diff --git a/FreeSql/Internal/Model/SelectTableInfo.cs b/FreeSql/Internal/Model/SelectTableInfo.cs
index eb1df4cd6..d61432d0b 100644
--- a/FreeSql/Internal/Model/SelectTableInfo.cs
+++ b/FreeSql/Internal/Model/SelectTableInfo.cs
@@ -25,5 +25,5 @@ namespace FreeSql.Internal.Model
public string Cascade { get; set; }
public string CascadeBefore { get; set; }
}
- public enum SelectTableInfoType { From, LeftJoin, InnerJoin, RightJoin, RawJoin, Parent }
+ public enum SelectTableInfoType { From, LeftJoin, InnerJoin, RightJoin, RawJoin, Parent, WithoutJoin }
}
diff --git a/Providers/FreeSql.Provider.ClickHouse/Curd/ClickHouseSelect.cs b/Providers/FreeSql.Provider.ClickHouse/Curd/ClickHouseSelect.cs
index 8b4cc58fe..45bdf6b16 100644
--- a/Providers/FreeSql.Provider.ClickHouse/Curd/ClickHouseSelect.cs
+++ b/Providers/FreeSql.Provider.ClickHouse/Curd/ClickHouseSelect.cs
@@ -39,7 +39,7 @@ namespace FreeSql.ClickHouse.Curd
sb.Append(_select);
if (_distinct) sb.Append("DISTINCT ");
sb.Append(field).Append(" \r\nFROM ");
- var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent).ToArray();
+ var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent && a.Type != SelectTableInfoType.WithoutJoin).ToArray();
var tbsfrom = _tables.Where(a => a.Type == SelectTableInfoType.From).ToArray();
for (var a = 0; a < tbsfrom.Length; a++)
{
@@ -81,6 +81,7 @@ namespace FreeSql.ClickHouse.Curd
{
case SelectTableInfoType.Parent:
case SelectTableInfoType.RawJoin:
+ case SelectTableInfoType.WithoutJoin:
continue;
case SelectTableInfoType.LeftJoin:
sb.Append(" \r\nGLOBAL LEFT JOIN ");
diff --git a/Providers/FreeSql.Provider.Custom/Curd/CustomSelect.cs b/Providers/FreeSql.Provider.Custom/Curd/CustomSelect.cs
index 341bc2e4c..b90e0689a 100644
--- a/Providers/FreeSql.Provider.Custom/Curd/CustomSelect.cs
+++ b/Providers/FreeSql.Provider.Custom/Curd/CustomSelect.cs
@@ -41,7 +41,7 @@ namespace FreeSql.Custom
throw new NotImplementedException(CoreErrorStrings.S_NotImplementSkipOffset("Custom"));
sb.Append(" \r\nFROM ");
- var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent).ToArray();
+ var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent && a.Type != SelectTableInfoType.WithoutJoin).ToArray();
var tbsfrom = _tables.Where(a => a.Type == SelectTableInfoType.From).ToArray();
for (var a = 0; a < tbsfrom.Length; a++)
{
@@ -81,6 +81,7 @@ namespace FreeSql.Custom
{
case SelectTableInfoType.Parent:
case SelectTableInfoType.RawJoin:
+ case SelectTableInfoType.WithoutJoin:
continue;
case SelectTableInfoType.LeftJoin:
sb.Append(" \r\nLEFT JOIN ");
diff --git a/Providers/FreeSql.Provider.Custom/MySql/Curd/CustomMySqlSelect.cs b/Providers/FreeSql.Provider.Custom/MySql/Curd/CustomMySqlSelect.cs
index 80bc8c8bc..b6faa0b9e 100644
--- a/Providers/FreeSql.Provider.Custom/MySql/Curd/CustomMySqlSelect.cs
+++ b/Providers/FreeSql.Provider.Custom/MySql/Curd/CustomMySqlSelect.cs
@@ -36,7 +36,7 @@ namespace FreeSql.Custom.MySql
sb.Append(_select);
if (_distinct) sb.Append("DISTINCT ");
sb.Append(field).Append(" \r\nFROM ");
- var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent).ToArray();
+ var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent && a.Type != SelectTableInfoType.WithoutJoin).ToArray();
var tbsfrom = _tables.Where(a => a.Type == SelectTableInfoType.From).ToArray();
for (var a = 0; a < tbsfrom.Length; a++)
{
@@ -76,6 +76,7 @@ namespace FreeSql.Custom.MySql
{
case SelectTableInfoType.Parent:
case SelectTableInfoType.RawJoin:
+ case SelectTableInfoType.WithoutJoin:
continue;
case SelectTableInfoType.LeftJoin:
sb.Append(" \r\nLEFT JOIN ");
diff --git a/Providers/FreeSql.Provider.Custom/Oracle/Curd/CustomOracleSelect.cs b/Providers/FreeSql.Provider.Custom/Oracle/Curd/CustomOracleSelect.cs
index 82ceef280..5cf9319c7 100644
--- a/Providers/FreeSql.Provider.Custom/Oracle/Curd/CustomOracleSelect.cs
+++ b/Providers/FreeSql.Provider.Custom/Oracle/Curd/CustomOracleSelect.cs
@@ -35,7 +35,7 @@ namespace FreeSql.Custom.Oracle
sbunion.Append(_select);
if (_distinct) sbunion.Append("DISTINCT ");
- var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent).ToArray();
+ var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent && a.Type != SelectTableInfoType.WithoutJoin).ToArray();
var tbsfrom = _tables.Where(a => a.Type == SelectTableInfoType.From).ToArray();
var isRownum = string.IsNullOrEmpty(_orderby) && _skip > 0;
@@ -82,6 +82,7 @@ namespace FreeSql.Custom.Oracle
{
case SelectTableInfoType.Parent:
case SelectTableInfoType.RawJoin:
+ case SelectTableInfoType.WithoutJoin:
continue;
case SelectTableInfoType.LeftJoin:
sbunion.Append(" \r\nLEFT JOIN ");
diff --git a/Providers/FreeSql.Provider.Custom/PostgreSQL/Curd/CustomPostgreSQLSelect.cs b/Providers/FreeSql.Provider.Custom/PostgreSQL/Curd/CustomPostgreSQLSelect.cs
index f69371c4e..c56e948b0 100644
--- a/Providers/FreeSql.Provider.Custom/PostgreSQL/Curd/CustomPostgreSQLSelect.cs
+++ b/Providers/FreeSql.Provider.Custom/PostgreSQL/Curd/CustomPostgreSQLSelect.cs
@@ -36,7 +36,7 @@ namespace FreeSql.Custom.PostgreSQL
sb.Append(_select);
if (_distinct) sb.Append("DISTINCT ");
sb.Append(field).Append(" \r\nFROM ");
- var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent).ToArray();
+ var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent && a.Type != SelectTableInfoType.WithoutJoin).ToArray();
var tbsfrom = _tables.Where(a => a.Type == SelectTableInfoType.From).ToArray();
for (var a = 0; a < tbsfrom.Length; a++)
{
@@ -76,6 +76,7 @@ namespace FreeSql.Custom.PostgreSQL
{
case SelectTableInfoType.Parent:
case SelectTableInfoType.RawJoin:
+ case SelectTableInfoType.WithoutJoin:
continue;
case SelectTableInfoType.LeftJoin:
sb.Append(" \r\nLEFT JOIN ");
diff --git a/Providers/FreeSql.Provider.Custom/SqlServer/Curd/CustomSqlServerSelect.cs b/Providers/FreeSql.Provider.Custom/SqlServer/Curd/CustomSqlServerSelect.cs
index 9ecc10c2b..9d87b874c 100644
--- a/Providers/FreeSql.Provider.Custom/SqlServer/Curd/CustomSqlServerSelect.cs
+++ b/Providers/FreeSql.Provider.Custom/SqlServer/Curd/CustomSqlServerSelect.cs
@@ -63,7 +63,7 @@ namespace FreeSql.Custom.SqlServer
if (_skip > 0) // 注意这个判断,大于 0 才使用 ROW_NUMBER ,否则属于第一页直接使用 TOP
rownum = $", ROW_NUMBER() OVER({_orderby.Trim('\r', '\n', ' ')}) AS __rownum__";
}
- var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent).ToArray();
+ var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent && a.Type != SelectTableInfoType.WithoutJoin).ToArray();
var tbsfrom = _tables.Where(a => a.Type == SelectTableInfoType.From).ToArray();
if (string.IsNullOrEmpty(rownum) == false && field == "*")
sb.Append(tbsfrom[0].Alias).Append("."); //#1519 bug
@@ -109,6 +109,7 @@ namespace FreeSql.Custom.SqlServer
{
case SelectTableInfoType.Parent:
case SelectTableInfoType.RawJoin:
+ case SelectTableInfoType.WithoutJoin:
continue;
case SelectTableInfoType.LeftJoin:
sb.Append(" \r\nLEFT JOIN ");
@@ -191,7 +192,7 @@ namespace FreeSql.Custom.SqlServer
if (_skip <= 0 && _limit > 0) sb.Append("TOP ").Append(_limit).Append(" ");
sb.Append(field);
sb.Append(" \r\nFROM ");
- var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent).ToArray();
+ var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent && a.Type != SelectTableInfoType.WithoutJoin).ToArray();
var tbsfrom = _tables.Where(a => a.Type == SelectTableInfoType.From).ToArray();
for (var a = 0; a < tbsfrom.Length; a++)
{
@@ -233,6 +234,7 @@ namespace FreeSql.Custom.SqlServer
{
case SelectTableInfoType.Parent:
case SelectTableInfoType.RawJoin:
+ case SelectTableInfoType.WithoutJoin:
continue;
case SelectTableInfoType.LeftJoin:
sb.Append(" \r\nLEFT JOIN ");
diff --git a/Providers/FreeSql.Provider.Dameng/Curd/DamengSelect.cs b/Providers/FreeSql.Provider.Dameng/Curd/DamengSelect.cs
index ec2c349df..3ca292604 100644
--- a/Providers/FreeSql.Provider.Dameng/Curd/DamengSelect.cs
+++ b/Providers/FreeSql.Provider.Dameng/Curd/DamengSelect.cs
@@ -35,7 +35,7 @@ namespace FreeSql.Dameng.Curd
sbunion.Append(_select);
if (_distinct) sbunion.Append("DISTINCT ");
- var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent).ToArray();
+ var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent && a.Type != SelectTableInfoType.WithoutJoin).ToArray();
var tbsfrom = _tables.Where(a => a.Type == SelectTableInfoType.From).ToArray();
var isRownum = string.IsNullOrEmpty(_orderby) && _skip > 0;
@@ -81,6 +81,7 @@ namespace FreeSql.Dameng.Curd
{
case SelectTableInfoType.Parent:
case SelectTableInfoType.RawJoin:
+ case SelectTableInfoType.WithoutJoin:
continue;
case SelectTableInfoType.LeftJoin:
sbunion.Append(" \r\nLEFT JOIN ");
diff --git a/Providers/FreeSql.Provider.Duckdb/Curd/DuckdbSelect.cs b/Providers/FreeSql.Provider.Duckdb/Curd/DuckdbSelect.cs
index a0a75390b..ba941fbc9 100644
--- a/Providers/FreeSql.Provider.Duckdb/Curd/DuckdbSelect.cs
+++ b/Providers/FreeSql.Provider.Duckdb/Curd/DuckdbSelect.cs
@@ -36,7 +36,7 @@ namespace FreeSql.Duckdb.Curd
sb.Append(_select);
if (_distinct) sb.Append("DISTINCT ");
sb.Append(field).Append(" \r\nFROM ");
- var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent).ToArray();
+ var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent && a.Type != SelectTableInfoType.WithoutJoin).ToArray();
var tbsfrom = _tables.Where(a => a.Type == SelectTableInfoType.From).ToArray();
for (var a = 0; a < tbsfrom.Length; a++)
{
@@ -76,6 +76,7 @@ namespace FreeSql.Duckdb.Curd
{
case SelectTableInfoType.Parent:
case SelectTableInfoType.RawJoin:
+ case SelectTableInfoType.WithoutJoin:
continue;
case SelectTableInfoType.LeftJoin:
sb.Append(" \r\nLEFT JOIN ");
diff --git a/Providers/FreeSql.Provider.Firebird/Curd/FirebirdSelect.cs b/Providers/FreeSql.Provider.Firebird/Curd/FirebirdSelect.cs
index d22e9656a..b2f0ce348 100644
--- a/Providers/FreeSql.Provider.Firebird/Curd/FirebirdSelect.cs
+++ b/Providers/FreeSql.Provider.Firebird/Curd/FirebirdSelect.cs
@@ -41,7 +41,7 @@ namespace FreeSql.Firebird.Curd
if (_distinct) sb.Append("DISTINCT ");
sb.Append(field).Append(" \r\nFROM ");
- var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent).ToArray();
+ var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent && a.Type != SelectTableInfoType.WithoutJoin).ToArray();
var tbsfrom = _tables.Where(a => a.Type == SelectTableInfoType.From).ToArray();
for (var a = 0; a < tbsfrom.Length; a++)
{
@@ -81,6 +81,7 @@ namespace FreeSql.Firebird.Curd
{
case SelectTableInfoType.Parent:
case SelectTableInfoType.RawJoin:
+ case SelectTableInfoType.WithoutJoin:
continue;
case SelectTableInfoType.LeftJoin:
sb.Append(" \r\nLEFT JOIN ");
diff --git a/Providers/FreeSql.Provider.GBase/Curd/GBaseSelect.cs b/Providers/FreeSql.Provider.GBase/Curd/GBaseSelect.cs
index c9d3c7c2c..ccca00212 100644
--- a/Providers/FreeSql.Provider.GBase/Curd/GBaseSelect.cs
+++ b/Providers/FreeSql.Provider.GBase/Curd/GBaseSelect.cs
@@ -41,7 +41,7 @@ namespace FreeSql.GBase.Curd
if (_distinct) sb.Append("DISTINCT ");
sb.Append(field).Append(" \r\nFROM ");
- var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent).ToArray();
+ var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent && a.Type != SelectTableInfoType.WithoutJoin).ToArray();
var tbsfrom = _tables.Where(a => a.Type == SelectTableInfoType.From).ToArray();
for (var a = 0; a < tbsfrom.Length; a++)
{
@@ -81,6 +81,7 @@ namespace FreeSql.GBase.Curd
{
case SelectTableInfoType.Parent:
case SelectTableInfoType.RawJoin:
+ case SelectTableInfoType.WithoutJoin:
continue;
case SelectTableInfoType.LeftJoin:
sb.Append(" \r\nLEFT JOIN ");
diff --git a/Providers/FreeSql.Provider.KingbaseES/Curd/KingbaseESSelect.cs b/Providers/FreeSql.Provider.KingbaseES/Curd/KingbaseESSelect.cs
index 9b444a882..9b785cc8d 100644
--- a/Providers/FreeSql.Provider.KingbaseES/Curd/KingbaseESSelect.cs
+++ b/Providers/FreeSql.Provider.KingbaseES/Curd/KingbaseESSelect.cs
@@ -36,7 +36,7 @@ namespace FreeSql.KingbaseES
sb.Append(_select);
if (_distinct) sb.Append("DISTINCT ");
sb.Append(field).Append(" \r\nFROM ");
- var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent).ToArray();
+ var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent && a.Type != SelectTableInfoType.WithoutJoin).ToArray();
var tbsfrom = _tables.Where(a => a.Type == SelectTableInfoType.From).ToArray();
for (var a = 0; a < tbsfrom.Length; a++)
{
@@ -76,6 +76,7 @@ namespace FreeSql.KingbaseES
{
case SelectTableInfoType.Parent:
case SelectTableInfoType.RawJoin:
+ case SelectTableInfoType.WithoutJoin:
continue;
case SelectTableInfoType.LeftJoin:
sb.Append(" \r\nLEFT JOIN ");
diff --git a/Providers/FreeSql.Provider.MsAccess/Curd/MsAccessSelect.cs b/Providers/FreeSql.Provider.MsAccess/Curd/MsAccessSelect.cs
index 5ec8bb777..b89d8f4a8 100644
--- a/Providers/FreeSql.Provider.MsAccess/Curd/MsAccessSelect.cs
+++ b/Providers/FreeSql.Provider.MsAccess/Curd/MsAccessSelect.cs
@@ -43,7 +43,7 @@ namespace FreeSql.MsAccess.Curd
sb.Append(" \r\nFROM ");
var fromIndex = sb.Length;
var ioinCounter = 0;
- var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent).ToArray();
+ var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent && a.Type != SelectTableInfoType.WithoutJoin).ToArray();
var tbsfrom = _tables.Where(a => a.Type == SelectTableInfoType.From).ToArray();
for (var a = 0; a < tbsfrom.Length; a++)
{
@@ -84,6 +84,7 @@ namespace FreeSql.MsAccess.Curd
{
case SelectTableInfoType.Parent:
case SelectTableInfoType.RawJoin:
+ case SelectTableInfoType.WithoutJoin:
continue;
case SelectTableInfoType.LeftJoin:
if (ioinCounter++ > 0) sb.Insert(fromIndex, "(").Append(") ");
diff --git a/Providers/FreeSql.Provider.MySql/Curd/MySqlSelect.cs b/Providers/FreeSql.Provider.MySql/Curd/MySqlSelect.cs
index 2bd9243f0..19e477d27 100644
--- a/Providers/FreeSql.Provider.MySql/Curd/MySqlSelect.cs
+++ b/Providers/FreeSql.Provider.MySql/Curd/MySqlSelect.cs
@@ -36,7 +36,7 @@ namespace FreeSql.MySql.Curd
sb.Append(_select);
if (_distinct) sb.Append("DISTINCT ");
sb.Append(field).Append(" \r\nFROM ");
- var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent).ToArray();
+ var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent && a.Type != SelectTableInfoType.WithoutJoin).ToArray();
var tbsfrom = _tables.Where(a => a.Type == SelectTableInfoType.From).ToArray();
for (var a = 0; a < tbsfrom.Length; a++)
{
@@ -76,6 +76,7 @@ namespace FreeSql.MySql.Curd
{
case SelectTableInfoType.Parent:
case SelectTableInfoType.RawJoin:
+ case SelectTableInfoType.WithoutJoin:
continue;
case SelectTableInfoType.LeftJoin:
sb.Append(" \r\nLEFT JOIN ");
diff --git a/Providers/FreeSql.Provider.Odbc/Default/Curd/OdbcSelect.cs b/Providers/FreeSql.Provider.Odbc/Default/Curd/OdbcSelect.cs
index 2c8b4d719..32bf2f02a 100644
--- a/Providers/FreeSql.Provider.Odbc/Default/Curd/OdbcSelect.cs
+++ b/Providers/FreeSql.Provider.Odbc/Default/Curd/OdbcSelect.cs
@@ -41,7 +41,7 @@ namespace FreeSql.Odbc.Default
throw new NotImplementedException(CoreErrorStrings.S_NotImplementSkipOffset("Default"));
sb.Append(" \r\nFROM ");
- var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent).ToArray();
+ var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent && a.Type != SelectTableInfoType.WithoutJoin).ToArray();
var tbsfrom = _tables.Where(a => a.Type == SelectTableInfoType.From).ToArray();
for (var a = 0; a < tbsfrom.Length; a++)
{
@@ -81,6 +81,7 @@ namespace FreeSql.Odbc.Default
{
case SelectTableInfoType.Parent:
case SelectTableInfoType.RawJoin:
+ case SelectTableInfoType.WithoutJoin:
continue;
case SelectTableInfoType.LeftJoin:
sb.Append(" \r\nLEFT JOIN ");
diff --git a/Providers/FreeSql.Provider.Odbc/MySql/Curd/OdbcMySqlSelect.cs b/Providers/FreeSql.Provider.Odbc/MySql/Curd/OdbcMySqlSelect.cs
index 3c8035760..ed8483b6d 100644
--- a/Providers/FreeSql.Provider.Odbc/MySql/Curd/OdbcMySqlSelect.cs
+++ b/Providers/FreeSql.Provider.Odbc/MySql/Curd/OdbcMySqlSelect.cs
@@ -36,7 +36,7 @@ namespace FreeSql.Odbc.MySql
sb.Append(_select);
if (_distinct) sb.Append("DISTINCT ");
sb.Append(field).Append(" \r\nFROM ");
- var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent).ToArray();
+ var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent && a.Type != SelectTableInfoType.WithoutJoin).ToArray();
var tbsfrom = _tables.Where(a => a.Type == SelectTableInfoType.From).ToArray();
for (var a = 0; a < tbsfrom.Length; a++)
{
@@ -76,6 +76,7 @@ namespace FreeSql.Odbc.MySql
{
case SelectTableInfoType.Parent:
case SelectTableInfoType.RawJoin:
+ case SelectTableInfoType.WithoutJoin:
continue;
case SelectTableInfoType.LeftJoin:
sb.Append(" \r\nLEFT JOIN ");
diff --git a/Providers/FreeSql.Provider.Odbc/Oracle/Curd/OdbcOracleSelect.cs b/Providers/FreeSql.Provider.Odbc/Oracle/Curd/OdbcOracleSelect.cs
index 8199a8bf1..91b486895 100644
--- a/Providers/FreeSql.Provider.Odbc/Oracle/Curd/OdbcOracleSelect.cs
+++ b/Providers/FreeSql.Provider.Odbc/Oracle/Curd/OdbcOracleSelect.cs
@@ -35,7 +35,7 @@ namespace FreeSql.Odbc.Oracle
sbunion.Append(_select);
if (_distinct) sbunion.Append("DISTINCT ");
- var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent).ToArray();
+ var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent && a.Type != SelectTableInfoType.WithoutJoin).ToArray();
var tbsfrom = _tables.Where(a => a.Type == SelectTableInfoType.From).ToArray();
var isRownum = string.IsNullOrEmpty(_orderby) && _skip > 0;
@@ -81,6 +81,7 @@ namespace FreeSql.Odbc.Oracle
{
case SelectTableInfoType.Parent:
case SelectTableInfoType.RawJoin:
+ case SelectTableInfoType.WithoutJoin:
continue;
case SelectTableInfoType.LeftJoin:
sbunion.Append(" \r\nLEFT JOIN ");
diff --git a/Providers/FreeSql.Provider.Odbc/PostgreSQL/Curd/OdbcPostgreSQLSelect.cs b/Providers/FreeSql.Provider.Odbc/PostgreSQL/Curd/OdbcPostgreSQLSelect.cs
index 01f9a5a5f..3ad0b87a8 100644
--- a/Providers/FreeSql.Provider.Odbc/PostgreSQL/Curd/OdbcPostgreSQLSelect.cs
+++ b/Providers/FreeSql.Provider.Odbc/PostgreSQL/Curd/OdbcPostgreSQLSelect.cs
@@ -36,7 +36,7 @@ namespace FreeSql.Odbc.PostgreSQL
sb.Append(_select);
if (_distinct) sb.Append("DISTINCT ");
sb.Append(field).Append(" \r\nFROM ");
- var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent).ToArray();
+ var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent && a.Type != SelectTableInfoType.WithoutJoin).ToArray();
var tbsfrom = _tables.Where(a => a.Type == SelectTableInfoType.From).ToArray();
for (var a = 0; a < tbsfrom.Length; a++)
{
@@ -76,6 +76,7 @@ namespace FreeSql.Odbc.PostgreSQL
{
case SelectTableInfoType.Parent:
case SelectTableInfoType.RawJoin:
+ case SelectTableInfoType.WithoutJoin:
continue;
case SelectTableInfoType.LeftJoin:
sb.Append(" \r\nLEFT JOIN ");
diff --git a/Providers/FreeSql.Provider.Odbc/SqlServer/Curd/OdbcSqlServerSelect.cs b/Providers/FreeSql.Provider.Odbc/SqlServer/Curd/OdbcSqlServerSelect.cs
index dd931e68d..22af3db24 100644
--- a/Providers/FreeSql.Provider.Odbc/SqlServer/Curd/OdbcSqlServerSelect.cs
+++ b/Providers/FreeSql.Provider.Odbc/SqlServer/Curd/OdbcSqlServerSelect.cs
@@ -63,7 +63,7 @@ namespace FreeSql.Odbc.SqlServer
if (_skip > 0) // 注意这个判断,大于 0 才使用 ROW_NUMBER ,否则属于第一页直接使用 TOP
rownum = $", ROW_NUMBER() OVER({_orderby.Trim('\r', '\n', ' ')}) AS __rownum__";
}
- var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent).ToArray();
+ var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent && a.Type != SelectTableInfoType.WithoutJoin).ToArray();
var tbsfrom = _tables.Where(a => a.Type == SelectTableInfoType.From).ToArray();
if (string.IsNullOrEmpty(rownum) == false && field == "*")
sb.Append(tbsfrom[0].Alias).Append("."); //#1519 bug
@@ -109,6 +109,7 @@ namespace FreeSql.Odbc.SqlServer
{
case SelectTableInfoType.Parent:
case SelectTableInfoType.RawJoin:
+ case SelectTableInfoType.WithoutJoin:
continue;
case SelectTableInfoType.LeftJoin:
sb.Append(" \r\nLEFT JOIN ");
@@ -191,7 +192,7 @@ namespace FreeSql.Odbc.SqlServer
if (_skip <= 0 && _limit > 0) sb.Append("TOP ").Append(_limit).Append(" ");
sb.Append(field);
sb.Append(" \r\nFROM ");
- var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent).ToArray();
+ var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent && a.Type != SelectTableInfoType.WithoutJoin).ToArray();
var tbsfrom = _tables.Where(a => a.Type == SelectTableInfoType.From).ToArray();
for (var a = 0; a < tbsfrom.Length; a++)
{
@@ -233,6 +234,7 @@ namespace FreeSql.Odbc.SqlServer
{
case SelectTableInfoType.Parent:
case SelectTableInfoType.RawJoin:
+ case SelectTableInfoType.WithoutJoin:
continue;
case SelectTableInfoType.LeftJoin:
sb.Append(" \r\nLEFT JOIN ");
diff --git a/Providers/FreeSql.Provider.Oracle/Curd/OracleSelect.cs b/Providers/FreeSql.Provider.Oracle/Curd/OracleSelect.cs
index d4faef90a..e4e20e72a 100644
--- a/Providers/FreeSql.Provider.Oracle/Curd/OracleSelect.cs
+++ b/Providers/FreeSql.Provider.Oracle/Curd/OracleSelect.cs
@@ -35,7 +35,7 @@ namespace FreeSql.Oracle.Curd
sbunion.Append(_select);
if (_distinct) sbunion.Append("DISTINCT ");
- var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent).ToArray();
+ var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent && a.Type != SelectTableInfoType.WithoutJoin).ToArray();
var tbsfrom = _tables.Where(a => a.Type == SelectTableInfoType.From).ToArray();
var isRownum = string.IsNullOrEmpty(_orderby) && _skip > 0;
@@ -82,6 +82,7 @@ namespace FreeSql.Oracle.Curd
{
case SelectTableInfoType.Parent:
case SelectTableInfoType.RawJoin:
+ case SelectTableInfoType.WithoutJoin:
continue;
case SelectTableInfoType.LeftJoin:
sbunion.Append(" \r\nLEFT JOIN ");
diff --git a/Providers/FreeSql.Provider.PostgreSQL/Curd/PostgreSQLSelect.cs b/Providers/FreeSql.Provider.PostgreSQL/Curd/PostgreSQLSelect.cs
index c4603b1af..7066157b1 100644
--- a/Providers/FreeSql.Provider.PostgreSQL/Curd/PostgreSQLSelect.cs
+++ b/Providers/FreeSql.Provider.PostgreSQL/Curd/PostgreSQLSelect.cs
@@ -36,7 +36,7 @@ namespace FreeSql.PostgreSQL.Curd
sb.Append(_select);
if (_distinct) sb.Append("DISTINCT ");
sb.Append(field).Append(" \r\nFROM ");
- var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent).ToArray();
+ var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent && a.Type != SelectTableInfoType.WithoutJoin).ToArray();
var tbsfrom = _tables.Where(a => a.Type == SelectTableInfoType.From).ToArray();
for (var a = 0; a < tbsfrom.Length; a++)
{
@@ -76,6 +76,7 @@ namespace FreeSql.PostgreSQL.Curd
{
case SelectTableInfoType.Parent:
case SelectTableInfoType.RawJoin:
+ case SelectTableInfoType.WithoutJoin:
continue;
case SelectTableInfoType.LeftJoin:
sb.Append(" \r\nLEFT JOIN ");
diff --git a/Providers/FreeSql.Provider.QuestDb/Curd/QuestDbSelect.cs b/Providers/FreeSql.Provider.QuestDb/Curd/QuestDbSelect.cs
index 029e54b42..dd6f05c63 100644
--- a/Providers/FreeSql.Provider.QuestDb/Curd/QuestDbSelect.cs
+++ b/Providers/FreeSql.Provider.QuestDb/Curd/QuestDbSelect.cs
@@ -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 && a.Type != SelectTableInfoType.Parent).ToArray();
+ var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent && a.Type != SelectTableInfoType.WithoutJoin).ToArray();
var tbsfrom = _tables.Where(a => a.Type == SelectTableInfoType.From).ToArray();
for (var a = 0; a < tbsfrom.Length; a++)
{
@@ -87,6 +87,7 @@ namespace FreeSql.QuestDb.Curd
{
case SelectTableInfoType.Parent:
case SelectTableInfoType.RawJoin:
+ case SelectTableInfoType.WithoutJoin:
continue;
case SelectTableInfoType.LeftJoin:
sb.Append(" \r\nLEFT JOIN ");
diff --git a/Providers/FreeSql.Provider.ShenTong/Curd/ShenTongSelect.cs b/Providers/FreeSql.Provider.ShenTong/Curd/ShenTongSelect.cs
index 9ac940178..645a8dea1 100644
--- a/Providers/FreeSql.Provider.ShenTong/Curd/ShenTongSelect.cs
+++ b/Providers/FreeSql.Provider.ShenTong/Curd/ShenTongSelect.cs
@@ -36,7 +36,7 @@ namespace FreeSql.ShenTong.Curd
sb.Append(_select);
if (_distinct) sb.Append("DISTINCT ");
sb.Append(field).Append(" \r\nFROM ");
- var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent).ToArray();
+ var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent && a.Type != SelectTableInfoType.WithoutJoin).ToArray();
var tbsfrom = _tables.Where(a => a.Type == SelectTableInfoType.From).ToArray();
for (var a = 0; a < tbsfrom.Length; a++)
{
@@ -76,6 +76,7 @@ namespace FreeSql.ShenTong.Curd
{
case SelectTableInfoType.Parent:
case SelectTableInfoType.RawJoin:
+ case SelectTableInfoType.WithoutJoin:
continue;
case SelectTableInfoType.LeftJoin:
sb.Append(" \r\nLEFT JOIN ");
diff --git a/Providers/FreeSql.Provider.SqlServer/Curd/SqlServerSelect.cs b/Providers/FreeSql.Provider.SqlServer/Curd/SqlServerSelect.cs
index 3a1baacb1..7f211fa81 100644
--- a/Providers/FreeSql.Provider.SqlServer/Curd/SqlServerSelect.cs
+++ b/Providers/FreeSql.Provider.SqlServer/Curd/SqlServerSelect.cs
@@ -63,7 +63,7 @@ namespace FreeSql.SqlServer.Curd
if (_skip > 0) // 注意这个判断,大于 0 才使用 ROW_NUMBER ,否则属于第一页直接使用 TOP
rownum = $", ROW_NUMBER() OVER({_orderby.Trim('\r', '\n', ' ')}) AS __rownum__";
}
- var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent).ToArray();
+ var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent && a.Type != SelectTableInfoType.WithoutJoin).ToArray();
var tbsfrom = _tables.Where(a => a.Type == SelectTableInfoType.From).ToArray();
if (string.IsNullOrEmpty(rownum) == false && field == "*")
sb.Append(tbsfrom[0].Alias).Append("."); //#1519 bug
@@ -109,6 +109,7 @@ namespace FreeSql.SqlServer.Curd
{
case SelectTableInfoType.Parent:
case SelectTableInfoType.RawJoin:
+ case SelectTableInfoType.WithoutJoin:
continue;
case SelectTableInfoType.LeftJoin:
sb.Append(" \r\nLEFT JOIN ");
@@ -191,7 +192,7 @@ namespace FreeSql.SqlServer.Curd
if (_skip <= 0 && _limit > 0) sb.Append("TOP ").Append(_limit).Append(" ");
sb.Append(field);
sb.Append(" \r\nFROM ");
- var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent).ToArray();
+ var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent && a.Type != SelectTableInfoType.WithoutJoin).ToArray();
var tbsfrom = _tables.Where(a => a.Type == SelectTableInfoType.From).ToArray();
for (var a = 0; a < tbsfrom.Length; a++)
{
@@ -233,6 +234,7 @@ namespace FreeSql.SqlServer.Curd
{
case SelectTableInfoType.Parent:
case SelectTableInfoType.RawJoin:
+ case SelectTableInfoType.WithoutJoin:
continue;
case SelectTableInfoType.LeftJoin:
sb.Append(" \r\nLEFT JOIN ");
diff --git a/Providers/FreeSql.Provider.Sqlite/Curd/SqliteSelect.cs b/Providers/FreeSql.Provider.Sqlite/Curd/SqliteSelect.cs
index 74353904b..54c49e600 100644
--- a/Providers/FreeSql.Provider.Sqlite/Curd/SqliteSelect.cs
+++ b/Providers/FreeSql.Provider.Sqlite/Curd/SqliteSelect.cs
@@ -36,7 +36,7 @@ namespace FreeSql.Sqlite.Curd
sb.Append(_select);
if (_distinct) sb.Append("DISTINCT ");
sb.Append(field).Append(" \r\nFROM ");
- var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent).ToArray();
+ var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent && a.Type != SelectTableInfoType.WithoutJoin).ToArray();
var tbsfrom = _tables.Where(a => a.Type == SelectTableInfoType.From).ToArray();
for (var a = 0; a < tbsfrom.Length; a++)
{
@@ -76,6 +76,7 @@ namespace FreeSql.Sqlite.Curd
{
case SelectTableInfoType.Parent:
case SelectTableInfoType.RawJoin:
+ case SelectTableInfoType.WithoutJoin:
continue;
case SelectTableInfoType.LeftJoin:
sb.Append(" \r\nLEFT JOIN ");
diff --git a/Providers/FreeSql.Provider.TDengine/Curd/TDengineSelect.cs b/Providers/FreeSql.Provider.TDengine/Curd/TDengineSelect.cs
index 475504f0c..8be90e861 100644
--- a/Providers/FreeSql.Provider.TDengine/Curd/TDengineSelect.cs
+++ b/Providers/FreeSql.Provider.TDengine/Curd/TDengineSelect.cs
@@ -48,7 +48,7 @@ namespace FreeSql.TDengine.Curd
sb.Append(_select);
if (_distinct) sb.Append("DISTINCT ");
sb.Append(field).Append(" \r\nFROM ");
- var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent).ToArray();
+ var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent && a.Type != SelectTableInfoType.WithoutJoin).ToArray();
var tbsfrom = _tables.Where(a => a.Type == SelectTableInfoType.From).ToArray();
for (var a = 0; a < tbsfrom.Length; a++)
{
@@ -104,6 +104,7 @@ namespace FreeSql.TDengine.Curd
{
case SelectTableInfoType.Parent:
case SelectTableInfoType.RawJoin:
+ case SelectTableInfoType.WithoutJoin:
continue;
case SelectTableInfoType.LeftJoin:
sb.Append(" \r\nLEFT JOIN ");
diff --git a/Providers/FreeSql.Provider.Xugu/Curd/XuguSelect.cs b/Providers/FreeSql.Provider.Xugu/Curd/XuguSelect.cs
index 9c47fee86..fb217834c 100644
--- a/Providers/FreeSql.Provider.Xugu/Curd/XuguSelect.cs
+++ b/Providers/FreeSql.Provider.Xugu/Curd/XuguSelect.cs
@@ -36,7 +36,7 @@ namespace FreeSql.Xugu.Curd
sb.Append(_select);
if (_distinct) sb.Append("DISTINCT ");
sb.Append(field).Append(" \r\nFROM ");
- var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent).ToArray();
+ var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent && a.Type != SelectTableInfoType.WithoutJoin).ToArray();
var tbsfrom = _tables.Where(a => a.Type == SelectTableInfoType.From).ToArray();
for (var a = 0; a < tbsfrom.Length; a++)
{
@@ -76,6 +76,7 @@ namespace FreeSql.Xugu.Curd
{
case SelectTableInfoType.Parent:
case SelectTableInfoType.RawJoin:
+ case SelectTableInfoType.WithoutJoin:
continue;
case SelectTableInfoType.LeftJoin:
sb.Append(" \r\nLEFT JOIN ");