mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-23 20:43:46 +08:00
Update exp to sql
This commit is contained in:
@@ -55,6 +55,10 @@ namespace SqlSugar
|
|||||||
this.Context.GetTranslationColumnName(parameter.Name),
|
this.Context.GetTranslationColumnName(parameter.Name),
|
||||||
tableName,
|
tableName,
|
||||||
null);
|
null);
|
||||||
|
if (this.Context?.SugarContext?.Context?.CurrentConnectionConfig?.DbType==DbType.SqlServer&&this.Context?.SugarContext?.Context?.CurrentConnectionConfig?.MoreSettings?.IsWithNoLockSubquery==true)
|
||||||
|
{
|
||||||
|
joinString = $"{joinString} {SqlWith.NoLock} ";
|
||||||
|
}
|
||||||
var result = joinString+ "ON " + SubTools.GetMethodValue(Context, argExp, ResolveExpressType.WhereMultiple);
|
var result = joinString+ "ON " + SubTools.GetMethodValue(Context, argExp, ResolveExpressType.WhereMultiple);
|
||||||
//var selfParameterName = Context.GetTranslationColumnName((argExp as LambdaExpression).Parameters.First().Name) + UtilConstants.Dot;
|
//var selfParameterName = Context.GetTranslationColumnName((argExp as LambdaExpression).Parameters.First().Name) + UtilConstants.Dot;
|
||||||
this.Context.JoinIndex++;
|
this.Context.JoinIndex++;
|
||||||
|
@@ -55,6 +55,10 @@ namespace SqlSugar
|
|||||||
this.Context.GetTranslationColumnName(parameter.Name),
|
this.Context.GetTranslationColumnName(parameter.Name),
|
||||||
tableName,
|
tableName,
|
||||||
null);
|
null);
|
||||||
|
if (this.Context?.SugarContext?.Context?.CurrentConnectionConfig?.DbType == DbType.SqlServer && this.Context?.SugarContext?.Context?.CurrentConnectionConfig?.MoreSettings?.IsWithNoLockSubquery == true)
|
||||||
|
{
|
||||||
|
joinString = $"{joinString} {SqlWith.NoLock} ";
|
||||||
|
}
|
||||||
var result = joinString+ "ON " + SubTools.GetMethodValue(Context, argExp, ResolveExpressType.WhereMultiple);
|
var result = joinString+ "ON " + SubTools.GetMethodValue(Context, argExp, ResolveExpressType.WhereMultiple);
|
||||||
//var selfParameterName = Context.GetTranslationColumnName((argExp as LambdaExpression).Parameters.First().Name) + UtilConstants.Dot;
|
//var selfParameterName = Context.GetTranslationColumnName((argExp as LambdaExpression).Parameters.First().Name) + UtilConstants.Dot;
|
||||||
this.Context.JoinIndex++;
|
this.Context.JoinIndex++;
|
||||||
|
@@ -244,7 +244,7 @@ namespace SqlSugar
|
|||||||
isubList.Add(new SubSelectDefault());
|
isubList.Add(new SubSelectDefault());
|
||||||
}
|
}
|
||||||
var db = this.context?.SugarContext?.Context;
|
var db = this.context?.SugarContext?.Context;
|
||||||
if (db != null)
|
if (db != null&& db?.CurrentConnectionConfig?.DbType == DbType.SqlServer)
|
||||||
{
|
{
|
||||||
if (db.CurrentConnectionConfig?.MoreSettings?.IsWithNoLockSubquery == true)
|
if (db.CurrentConnectionConfig?.MoreSettings?.IsWithNoLockSubquery == true)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user