- 增加 Pgsql JToken/JObject/JArray 索引访问的表达式解析;

- 增加 object.Equals 表达式解析;
This commit is contained in:
28810
2020-03-19 22:46:40 +08:00
parent 5f166c08aa
commit a5e6573851
5 changed files with 50 additions and 49 deletions

View File

@ -2961,6 +2961,40 @@
<param name="end"></param>
<returns></returns>
</member>
<member name="M:FreeSqlGlobalExpressionCall.Contains``2(System.Collections.Generic.IEnumerable{System.ValueTuple{``0,``1}},``0,``1)">
<summary>
C#:从元组集合中查找 exp1, exp2 是否存在<para></para>
SQL <para></para>
exp1 = that[0].Item1 and exp2 = that[0].Item2 OR <para></para>
exp1 = that[1].Item1 and exp2 = that[1].Item2 OR <para></para>
... <para></para>
注意:当 that 为 null 或 empty 时,返回 1=0
</summary>
<typeparam name="T1"></typeparam>
<typeparam name="T2"></typeparam>
<param name="that"></param>
<param name="exp1"></param>
<param name="exp2"></param>
<returns></returns>
</member>
<member name="M:FreeSqlGlobalExpressionCall.Contains``3(System.Collections.Generic.IEnumerable{System.ValueTuple{``0,``1,``2}},``0,``1,``2)">
<summary>
C#:从元组集合中查找 exp1, exp2, exp2 是否存在<para></para>
SQL <para></para>
exp1 = that[0].Item1 and exp2 = that[0].Item2 and exp3 = that[0].Item3 OR <para></para>
exp1 = that[1].Item1 and exp2 = that[1].Item2 and exp3 = that[1].Item3 OR <para></para>
... <para></para>
注意:当 that 为 null 或 empty 时,返回 1=0
</summary>
<typeparam name="T1"></typeparam>
<typeparam name="T2"></typeparam>
<typeparam name="T3"></typeparam>
<param name="that"></param>
<param name="exp1"></param>
<param name="exp2"></param>
<param name="exp3"></param>
<returns></returns>
</member>
<member name="M:FreeSqlGlobalExtensions.Distance(System.Drawing.Point,System.Drawing.Point)">
<summary>
测量两个经纬度的距离,返回单位:米
@ -3234,49 +3268,3 @@
</member>
</members>
</doc>
<EFBFBD>完成可能被其他线程事务自动提交
</summary>
<param name="handler">事务体 () => {}</param>
</member>
<member name="M:IFreeSql.Transaction(System.TimeSpan,System.Action)">
<summary>
开启事务(不支持异步)
</summary>
<param name="timeout">超时,未执行完成(可能)被其他线程事务自动提交</param>
<param name="handler">事务体 () => {}</param>
</member>
<member name="M:IFreeSql.Transaction(System.Data.IsolationLevel,System.TimeSpan,System.Action)">
<summary>
开启事务(不支持异步)
</summary>
<param name="isolationLevel"></param>
<param name="handler">事务体 () => {}</param>
<param name="timeout">超时,未执行完成(可能)被其他线程事务自动提交</param>
</member>
<member name="P:IFreeSql.Ado">
<summary>
数据库访问对象
</summary>
</member>
<member name="P:IFreeSql.Aop">
<summary>
所有拦截方法都在这里
</summary>
</member>
<member name="P:IFreeSql.CodeFirst">
<summary>
CodeFirst 模式开发相关方法
</summary>
</member>
<member name="P:IFreeSql.DbFirst">
<summary>
DbFirst 模式开发相关方法
</summary>
</member>
<member name="P:IFreeSql.GlobalFilter">
<summary>
全局过滤设置,可默认附加为 Select/Update/Delete 条件
</summary>
</member>
</members>
</doc>

View File

@ -675,8 +675,11 @@ namespace FreeSql.Internal
case "System.Convert": other3Exp = ExpressionLambdaToSqlCallConvert(exp3, tsc); break;
}
if (string.IsNullOrEmpty(other3Exp) == false) return other3Exp;
if (exp3.Method.Name == "Equals" && exp3.Object != null && exp3.Arguments.Count > 0)
return ExpressionBinary("=", exp3.Object, exp3.Arguments[0], tsc);
if (exp3.Method.Name == "Equals")
{
if (exp3.Arguments.Count > 0 && exp3.Object != null) return ExpressionBinary("=", exp3.Object, exp3.Arguments[0], tsc);
if (exp3.Arguments.Count > 1 && exp3.Method.DeclaringType == typeof(object)) return ExpressionBinary("=", exp3.Arguments[0], exp3.Arguments[1], tsc);
}
if (callType.FullName.StartsWith("FreeSql.ISelectGroupingAggregate`"))
{
//if (exp3.Type == typeof(string) && exp3.Arguments.Any() && exp3.Arguments[0].NodeType == ExpressionType.Constant) {