mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-23 12:33:44 +08:00
Add ConnMoreSettings.DisableMillisecond
This commit is contained in:
@@ -11,6 +11,7 @@ namespace SqlSugar
|
||||
public bool IsWithNoLockQuery { get; set; }
|
||||
|
||||
public bool DisableNvarchar { get; set; }
|
||||
public bool DisableMillisecond { get; set; }
|
||||
public bool PgSqlIsAutoToLower = true;
|
||||
public int DefaultCacheDurationInSeconds { get; set; }
|
||||
public bool? TableEnumIsString { get; set; }
|
||||
|
@@ -95,8 +95,15 @@ namespace SqlSugar
|
||||
{
|
||||
date = Convert.ToDateTime("1900-1-1");
|
||||
}
|
||||
if (this.Context.CurrentConnectionConfig?.MoreSettings?.DisableMillisecond == true)
|
||||
{
|
||||
return "'" + date.ToString("yyyy-MM-dd HH:mm:ss") + "'";
|
||||
}
|
||||
else
|
||||
{
|
||||
return "'" + date.ToString("yyyy-MM-dd HH:mm:ss.fff") + "'";
|
||||
}
|
||||
}
|
||||
else if (type.IsEnum())
|
||||
{
|
||||
if (this.Context.CurrentConnectionConfig.MoreSettings?.TableEnumIsString == true)
|
||||
|
@@ -51,8 +51,15 @@ namespace SqlSugar
|
||||
{
|
||||
date = Convert.ToDateTime("1900-1-1");
|
||||
}
|
||||
if (this.Context.CurrentConnectionConfig?.MoreSettings?.DisableMillisecond == true)
|
||||
{
|
||||
return "'" + date.ToString("yyyy-MM-dd HH:mm:ss") + "'";
|
||||
}
|
||||
else
|
||||
{
|
||||
return "'" + date.ToString("yyyy-MM-dd HH:mm:ss.fff") + "'";
|
||||
}
|
||||
}
|
||||
else if (type == UtilConstants.DateType && iswhere)
|
||||
{
|
||||
var parameterName = this.Builder.SqlParameterKeyWord + name + i;
|
||||
|
Reference in New Issue
Block a user