mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-10-20 10:44:05 +08:00
Update exp to sql
This commit is contained in:
@@ -490,10 +490,21 @@ namespace SqlSugar
|
|||||||
{
|
{
|
||||||
//var property=item.Type.GetProperties().Where(it => it.Name == newExpressionInfo.l).First();
|
//var property=item.Type.GetProperties().Where(it => it.Name == newExpressionInfo.l).First();
|
||||||
//asName = GetAsName(item, newExpressionInfo.ShortName, property);
|
//asName = GetAsName(item, newExpressionInfo.ShortName, property);
|
||||||
parameter.Context.Result.Append(this.Context.GetAsString(
|
if (newExpressionInfo.Type == nameof(ConstantExpression))
|
||||||
this.Context.SqlTranslationLeft+asName + "." + newExpressionInfo.LeftNameName+this.Context.SqlTranslationRight,
|
{
|
||||||
newExpressionInfo.ShortName+"."+newExpressionInfo.RightDbName
|
parameter.Context.Result.Append(
|
||||||
|
newExpressionInfo.RightDbName +" AS "+
|
||||||
|
this.Context.SqlTranslationLeft + asName + "." + newExpressionInfo.LeftNameName + this.Context.SqlTranslationRight
|
||||||
|
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
parameter.Context.Result.Append(this.Context.GetAsString(
|
||||||
|
this.Context.SqlTranslationLeft + asName + "." + newExpressionInfo.LeftNameName + this.Context.SqlTranslationRight,
|
||||||
|
newExpressionInfo.ShortName + "." + newExpressionInfo.RightDbName
|
||||||
));
|
));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (!this.Context.IsJoin && (item is MemberInitExpression || item is NewExpression))
|
else if (!this.Context.IsJoin && (item is MemberInitExpression || item is NewExpression))
|
||||||
|
Reference in New Issue
Block a user