mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-11-24 16:43:17 +08:00
Update 人大金仓
This commit is contained in:
@@ -104,6 +104,7 @@ namespace SqlSugar
|
|||||||
public DateTime GetDate()
|
public DateTime GetDate()
|
||||||
{
|
{
|
||||||
var sqlBuilder = InstanceFactory.GetSqlbuilder(this.Context.CurrentConnectionConfig);
|
var sqlBuilder = InstanceFactory.GetSqlbuilder(this.Context.CurrentConnectionConfig);
|
||||||
|
sqlBuilder.Context = this.Context;
|
||||||
var obj= this.Ado.GetScalar(sqlBuilder.FullSqlDateNow);
|
var obj= this.Ado.GetScalar(sqlBuilder.FullSqlDateNow);
|
||||||
if (obj is DateTime s)
|
if (obj is DateTime s)
|
||||||
return s;
|
return s;
|
||||||
|
|||||||
@@ -24,6 +24,10 @@ namespace SqlSugar
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
|
if (UtilMethods.GetDataBaseModel(this.Context) == DbType.SqlServer)
|
||||||
|
{
|
||||||
|
return "getdate()";
|
||||||
|
}
|
||||||
return "current_date";
|
return "current_date";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -31,6 +35,10 @@ namespace SqlSugar
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
|
if (UtilMethods.GetDataBaseModel(this.Context) == DbType.SqlServer)
|
||||||
|
{
|
||||||
|
return "select getdate()";
|
||||||
|
}
|
||||||
return "select current_date";
|
return "select current_date";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,10 @@ namespace SqlSugar
|
|||||||
{
|
{
|
||||||
public class UtilMethods
|
public class UtilMethods
|
||||||
{
|
{
|
||||||
|
public static DbType? GetDataBaseModel(ISqlSugarClient client)
|
||||||
|
{
|
||||||
|
return client?.CurrentConnectionConfig?.MoreSettings?.DatabaseModel;
|
||||||
|
}
|
||||||
public static bool IsArrayOrList(Type propertyType)
|
public static bool IsArrayOrList(Type propertyType)
|
||||||
{
|
{
|
||||||
if (propertyType==null||propertyType == typeof(string))
|
if (propertyType==null||propertyType == typeof(string))
|
||||||
|
|||||||
Reference in New Issue
Block a user