Browse Source

-

pull/12/MERGE
sunkaixuan 8 years ago
parent
commit
ffe83f16c3
  1. BIN
      .vs/SqlSugar/v14/.suo
  2. BIN
      OrmTest/bin/Debug/OrmTest.exe
  3. BIN
      OrmTest/bin/Debug/OrmTest.pdb
  4. BIN
      OrmTest/bin/Debug/SqlSugar.dll
  5. BIN
      OrmTest/bin/Debug/SqlSugar.pdb
  6. BIN
      OrmTest/obj/Debug/OrmTest.csprojResolveAssemblyReference.cache
  7. BIN
      OrmTest/obj/Debug/OrmTest.exe
  8. BIN
      OrmTest/obj/Debug/OrmTest.pdb
  9. 2
      SqlSugar/ExpressionsToSql/BinaryExpressionInfo.cs
  10. 6
      SqlSugar/ExpressionsToSql/ExpressionConst.cs
  11. 7
      SqlSugar/ExpressionsToSql/ExpressionContext.cs
  12. 7
      SqlSugar/ExpressionsToSql/ResolveItems/BinaryExpressionResolve.cs
  13. 2
      SqlSugar/ExpressionsToSql/ResolveItems/MemberExpressionResolve.cs
  14. BIN
      SqlSugar/bin/Debug/SqlSugar.dll
  15. BIN
      SqlSugar/bin/Debug/SqlSugar.pdb
  16. 1
      SqlSugar/obj/Debug/SqlSugar.csproj.FileListAbsolute.txt
  17. BIN
      SqlSugar/obj/Debug/SqlSugar.csprojResolveAssemblyReference.cache
  18. BIN
      SqlSugar/obj/Debug/SqlSugar.dll
  19. BIN
      SqlSugar/obj/Debug/SqlSugar.pdb

BIN
.vs/SqlSugar/v14/.suo

Binary file not shown.

BIN
OrmTest/bin/Debug/OrmTest.exe

Binary file not shown.

BIN
OrmTest/bin/Debug/OrmTest.pdb

Binary file not shown.

BIN
OrmTest/bin/Debug/SqlSugar.dll

Binary file not shown.

BIN
OrmTest/bin/Debug/SqlSugar.pdb

Binary file not shown.

BIN
OrmTest/obj/Debug/OrmTest.csprojResolveAssemblyReference.cache

Binary file not shown.

BIN
OrmTest/obj/Debug/OrmTest.exe

Binary file not shown.

BIN
OrmTest/obj/Debug/OrmTest.pdb

Binary file not shown.

2
SqlSugar/ExpressionsToSql/BinaryExpressionInfo.cs

@ -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; }
}
}

6
SqlSugar/ExpressionsToSql/ExpressionConst.cs

@ -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
{

7
SqlSugar/ExpressionsToSql/ExpressionContext.cs

@ -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;

7
SqlSugar/ExpressionsToSql/ResolveItems/BinaryExpressionResolve.cs

@ -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();
}

2
SqlSugar/ExpressionsToSql/ResolveItems/MemberExpressionResolve.cs

@ -18,7 +18,7 @@ namespace SqlSugar
{
IsLeft = Convert.ToBoolean(IsLeft),
Value = fieldName,
ExpressionType = expression.NodeType
ExpressionType = expression.GetType()
}));
if (isLeft == null && base.SqlWhere == null)
{

BIN
SqlSugar/bin/Debug/SqlSugar.dll

Binary file not shown.

BIN
SqlSugar/bin/Debug/SqlSugar.pdb

Binary file not shown.

1
SqlSugar/obj/Debug/SqlSugar.csproj.FileListAbsolute.txt

@ -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

Binary file not shown.

BIN
SqlSugar/obj/Debug/SqlSugar.dll

Binary file not shown.

BIN
SqlSugar/obj/Debug/SqlSugar.pdb

Binary file not shown.
Loading…
Cancel
Save