mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-24 07:07:23 +08:00
-
This commit is contained in:
parent
57c2cba748
commit
ffe83f16c3
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -9,7 +9,7 @@ namespace SqlSugar
|
||||
public class BinaryExpressionInfo
|
||||
{
|
||||
public bool IsLeft { get; set; }
|
||||
public ExpressionType ExpressionType { get;set;}
|
||||
public Type ExpressionType { get;set;}
|
||||
public object Value { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
using System.Text;
|
||||
|
||||
namespace SqlSugar
|
||||
{
|
||||
internal class ExpressionConst
|
||||
@ -11,6 +11,8 @@ namespace SqlSugar
|
||||
public const string BinaryFormatString = " ( {0} {1} {2} ) ";
|
||||
public const string Format0 = "{0}";
|
||||
public const string Format1 = "{1}";
|
||||
public readonly static Type MemberExpressionType = typeof(MemberExpression);
|
||||
public readonly static Type ConstantExpressionType = typeof(ConstantExpression);
|
||||
internal static string GetThrowMessage(string enMessage, string cnMessage, params string[] args)
|
||||
{
|
||||
List<string> formatArgs = new List<string>() { enMessage, cnMessage };
|
||||
@ -19,8 +21,6 @@ namespace SqlSugar
|
||||
}
|
||||
}
|
||||
internal partial class ErrorMessage
|
||||
|
||||
|
||||
{
|
||||
internal static string OperatorError
|
||||
{
|
||||
|
@ -11,6 +11,13 @@ namespace SqlSugar
|
||||
{
|
||||
public ResolveExpressType Type { get; set; }
|
||||
public Expression Expression { get; set; }
|
||||
public virtual string SqlParameterKeyWord
|
||||
{
|
||||
get
|
||||
{
|
||||
return "@";
|
||||
}
|
||||
}
|
||||
public virtual string GetaMppingColumnsName(string name)
|
||||
{
|
||||
return name;
|
||||
|
@ -50,6 +50,13 @@ namespace SqlSugar
|
||||
{
|
||||
var leftInfo = parameter.BinaryExpressionInfoList.Single(it => it.Value.IsLeft).Value;
|
||||
var rightInfo = parameter.BinaryExpressionInfoList.Single(it => !it.Value.IsLeft).Value;
|
||||
if (leftInfo.ExpressionType == ExpressionConst.ConstantExpressionType)
|
||||
{
|
||||
var sqlParameterKeyWord = parameter.Context.SqlParameterKeyWord;
|
||||
var reval= string.Format("{0}{1}{2}",sqlParameterKeyWord,leftInfo.Value,parameter.Context.Index+parameter.Index);
|
||||
parameter.Context.Parameters.Add(new SugarParameter(reval,leftInfo.Value));
|
||||
return reval;
|
||||
}
|
||||
return leftInfo.Value.ObjToString();
|
||||
}
|
||||
|
||||
|
@ -18,7 +18,7 @@ namespace SqlSugar
|
||||
{
|
||||
IsLeft = Convert.ToBoolean(IsLeft),
|
||||
Value = fieldName,
|
||||
ExpressionType = expression.NodeType
|
||||
ExpressionType = expression.GetType()
|
||||
}));
|
||||
if (isLeft == null && base.SqlWhere == null)
|
||||
{
|
||||
|
Binary file not shown.
Binary file not shown.
@ -3,3 +3,4 @@ F:\MyOpenSource\SqlSugar4.XNew\SqlSugar\SqlSugar\bin\Debug\SqlSugar.pdb
|
||||
F:\MyOpenSource\SqlSugar4.XNew\SqlSugar\SqlSugar\bin\Debug\Newtonsoft.Json.dll
|
||||
F:\MyOpenSource\SqlSugar4.XNew\SqlSugar\SqlSugar\obj\Debug\SqlSugar.dll
|
||||
F:\MyOpenSource\SqlSugar4.XNew\SqlSugar\SqlSugar\obj\Debug\SqlSugar.pdb
|
||||
F:\MyOpenSource\SqlSugar4.XNew\SqlSugar\SqlSugar\obj\Debug\SqlSugar.csprojResolveAssemblyReference.cache
|
||||
|
BIN
SqlSugar/obj/Debug/SqlSugar.csprojResolveAssemblyReference.cache
Normal file
BIN
SqlSugar/obj/Debug/SqlSugar.csprojResolveAssemblyReference.cache
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user