mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-22 20:13:41 +08:00
Synchronization code
This commit is contained in:
@@ -0,0 +1,13 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace SqlSugar
|
||||||
|
{
|
||||||
|
public class ExpressionContextCase
|
||||||
|
{
|
||||||
|
public bool IsDateString { get; set; }
|
||||||
|
}
|
||||||
|
}
|
@@ -19,6 +19,7 @@ namespace SqlSugar
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Properties
|
#region Properties
|
||||||
|
public virtual ExpressionContextCase Case{ get; set; }
|
||||||
public ExpressionOutParameter SugarContext { get; set; }
|
public ExpressionOutParameter SugarContext { get; set; }
|
||||||
public IDbMethods DbMehtods
|
public IDbMethods DbMehtods
|
||||||
{
|
{
|
||||||
|
@@ -516,9 +516,16 @@ namespace SqlSugar
|
|||||||
this.Start();
|
this.Start();
|
||||||
var isConst = parameter.CommonTempData.GetType() == UtilConstants.DateType;
|
var isConst = parameter.CommonTempData.GetType() == UtilConstants.DateType;
|
||||||
if (isConst)
|
if (isConst)
|
||||||
|
{
|
||||||
|
if (this.Context?.Case?.IsDateString==true)
|
||||||
|
{
|
||||||
|
AppendMember(parameter, isLeft, GetToDateShort("'" + parameter.CommonTempData.ObjToDate().Date.ToString("yyyy-MM-dd") + "'"));
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
AppendValue(parameter, isLeft, parameter.CommonTempData.ObjToDate().Date);
|
AppendValue(parameter, isLeft, parameter.CommonTempData.ObjToDate().Date);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var GetYear = new MethodCallExpressionModel()
|
var GetYear = new MethodCallExpressionModel()
|
||||||
|
@@ -4,6 +4,9 @@ namespace SqlSugar
|
|||||||
{
|
{
|
||||||
public class SqliteExpressionContext : ExpressionContext, ILambdaExpressions
|
public class SqliteExpressionContext : ExpressionContext, ILambdaExpressions
|
||||||
{
|
{
|
||||||
|
public override ExpressionContextCase Case { get; set; } = new ExpressionContextCase() {
|
||||||
|
IsDateString= true,
|
||||||
|
};
|
||||||
public SqlSugarProvider Context { get; set; }
|
public SqlSugarProvider Context { get; set; }
|
||||||
public SqliteExpressionContext()
|
public SqliteExpressionContext()
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user