Update exp to sql

This commit is contained in:
sunkaixuan
2022-04-13 12:47:33 +08:00
parent 9897a0e5c5
commit 5f3adeef43
5 changed files with 17 additions and 0 deletions

View File

@@ -242,6 +242,7 @@ namespace SqlSugar
{
resolveExpress.PgSqlIsAutoToLower = true;
}
resolveExpress.SugarContext = new ExpressionOutParameter() { Context = this.Context };
resolveExpress.RootExpression = expression;
resolveExpress.JoinQueryInfos = Builder.QueryBuilder.JoinQueryInfos;
resolveExpress.IsSingle = IsSingle()&& resolveType!= ResolveExpressType.WhereMultiple;

View File

@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SqlSugar
{
public class ExpressionOutParameter
{
public SqlSugarProvider Context { get; set; }
}
}

View File

@@ -19,6 +19,7 @@ namespace SqlSugar
#endregion
#region Properties
public ExpressionOutParameter SugarContext { get; set; }
public IDbMethods DbMehtods
{
get

View File

@@ -28,6 +28,7 @@ namespace SqlSugar
Action RefreshMapping { get; set; }
bool PgSqlIsAutoToLower { get; set; }
Expression RootExpression { get; set; }
ExpressionOutParameter SugarContext { get; set; }
bool? TableEnumIsString { get; set; }
string GetAsString(string fieldName, string fieldValue);

View File

@@ -104,6 +104,7 @@
<Compile Include="Enum\NavigatType.cs" />
<Compile Include="Enum\SugarActionType.cs" />
<Compile Include="Entities\SugarConnection.cs" />
<Compile Include="ExpressionsToSql\Common\ExpressionOutParameter.cs" />
<Compile Include="ExpressionsToSql\ResolveItems\NavgateExpression.cs" />
<Compile Include="ExpressionsToSql\Subquery\SubTemplate.cs" />
<Compile Include="ExpressionsToSql\Subquery\SubqueryableN.cs" />