From a301fdd130ee5eb740b8e1ffffcc80c9e9bf52fe Mon Sep 17 00:00:00 2001
From: 2881099 <2881099@qq.com>
Date: Sun, 25 Sep 2022 13:12:04 +0800
Subject: [PATCH] =?UTF-8?q?-=20=E4=BC=98=E5=8C=96=20=E5=AF=BC=E8=88=AA?=
=?UTF-8?q?=E5=B1=9E=E6=80=A7=E6=9C=AA=E9=85=8D=E7=BD=AE=E5=85=B3=E7=B3=BB?=
=?UTF-8?q?=E5=85=88=20Where=20=E5=90=8E=20InnerJoin=20=E7=9A=84=E9=97=AE?=
=?UTF-8?q?=E9=A2=98=EF=BC=9B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
FreeSql/FreeSql.xml | 183 ---------------------------
FreeSql/Internal/CommonExpression.cs | 2 +-
2 files changed, 1 insertion(+), 184 deletions(-)
diff --git a/FreeSql/FreeSql.xml b/FreeSql/FreeSql.xml
index 74b1a582..25ea1e50 100644
--- a/FreeSql/FreeSql.xml
+++ b/FreeSql/FreeSql.xml
@@ -3349,177 +3349,6 @@
-
-
- 测试数据库是否连接正确,本方法执行如下命令:
- MySql/SqlServer/PostgreSQL/达梦/人大金仓/神通: SELECT 1
- Oracle: SELECT 1 FROM dual
-
- 命令超时设置(秒)
-
- true: 成功, false: 失败
-
-
-
- 查询,若使用读写分离,查询【从库】条件cmdText.StartsWith("SELECT "),否则查询【主库】
-
-
-
-
-
-
-
-
-
- 查询,ExecuteReaderAsync(dr => {}, "select * from user where age > @age", new { age = 25 })
- 提示:parms 参数还可以传 Dictionary<string, object>
-
-
-
-
-
-
-
-
- 查询
-
-
-
-
-
-
-
-
- 查询,ExecuteArrayAsync("select * from user where age > @age", new { age = 25 })
- 提示:parms 参数还可以传 Dictionary<string, object>
-
-
-
-
-
-
-
-
- 查询
-
-
-
-
-
-
-
-
- 查询,ExecuteDataSetAsync("select * from user where age > @age; select 2", new { age = 25 })
- 提示:parms 参数还可以传 Dictionary<string, object>
-
-
-
-
-
-
-
-
- 查询
-
-
-
-
-
-
-
-
- 查询,ExecuteDataTableAsync("select * from user where age > @age", new { age = 25 })
- 提示:parms 参数还可以传 Dictionary<string, object>
-
-
-
-
-
-
-
-
- 在【主库】执行
-
-
-
-
-
-
-
-
- 在【主库】执行,ExecuteNonQueryAsync("delete from user where age > @age", new { age = 25 })
- 提示:parms 参数还可以传 Dictionary<string, object>
-
-
-
-
-
-
-
-
- 在【主库】执行
-
-
-
-
-
-
-
-
- 在【主库】执行,ExecuteScalarAsync("select 1 from user where age > @age", new { age = 25 })
- 提示:parms 参数还可以传 Dictionary<string, object>
-
-
-
-
-
-
-
-
- 执行SQL返回对象集合,QueryAsync<User>("select * from user where age > @age", new SqlParameter { ParameterName = "age", Value = 25 })
-
-
-
-
-
-
-
-
-
-
- 执行SQL返回对象集合,QueryAsync<User>("select * from user where age > @age", new { age = 25 })
- 提示:parms 参数还可以传 Dictionary<string, object>
-
-
-
-
-
-
-
-
-
- 执行SQL返回对象集合,Query<User>("select * from user where age > @age; select * from address", new SqlParameter { ParameterName = "age", Value = 25 })
-
-
-
-
-
-
-
-
-
-
-
- 执行SQL返回对象集合,Query<User, Address>("select * from user where age > @age; select * from address", new { age = 25 })
- 提示:parms 参数还可以传 Dictionary<string, object>
-
-
-
-
-
-
-
-
可自定义解析表达式
@@ -4550,12 +4379,6 @@
超时
-
-
- 获取资源
-
-
-
使用完毕后,归还资源
@@ -4631,12 +4454,6 @@
资源对象
-
-
- 从对象池获取对象成功的时候触发,通过该方法统计或初始化对象
-
- 资源对象
-
归还对象给对象池的时候触发
diff --git a/FreeSql/Internal/CommonExpression.cs b/FreeSql/Internal/CommonExpression.cs
index af0add07..1dd8ff87 100644
--- a/FreeSql/Internal/CommonExpression.cs
+++ b/FreeSql/Internal/CommonExpression.cs
@@ -687,7 +687,7 @@ namespace FreeSql.Internal
else
{
var find = _tables.Where((a, c) => c > 0 &&
- (a.Type == tbtype || a.Type == SelectTableInfoType.From) &&
+ (a.Type == tbtype || a.Type == SelectTableInfoType.From || a.Type == SelectTableInfoType.LeftJoin) &&
string.IsNullOrEmpty(a.On) &&
dicRegexAlias.GetOrAdd(a.Alias, alias => new Regex($@"\b{alias}\.", RegexOptions.Compiled)).IsMatch(sql)).LastOrDefault();
if (find != null)