mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-23 13:06:50 +08:00
Update TDengine
This commit is contained in:
parent
50290e1112
commit
8dbc5d0802
@ -78,6 +78,8 @@ namespace SqlSugar.TDengine
|
||||
{
|
||||
((SqlSugar.TDengineCore.TDengineDataAdapter)dataAdapter).SelectCommand = (TDengineCommand)command;
|
||||
}
|
||||
public static bool _IsIsNanosecond { get; set; }
|
||||
public static bool _IsMicrosecond { get; set; }
|
||||
/// <summary>
|
||||
/// if mysql return MySqlParameter[] pars
|
||||
/// if sqlerver return SqlParameter[] pars ...
|
||||
@ -97,14 +99,19 @@ namespace SqlSugar.TDengine
|
||||
parameter.Value = parameter.Value?.ToString()?.ToLower();
|
||||
}
|
||||
var sqlParameter = new TDengineParameter(parameter.ParameterName,parameter.Value,parameter.DbType,0);
|
||||
if (parameter.CustomDbType?.Equals(System.Data.DbType.DateTime2) == true)
|
||||
if (parameter.CustomDbType?.Equals(System.Data.DbType.DateTime2) == true|| _IsMicrosecond)
|
||||
{
|
||||
sqlParameter.IsMicrosecond= true;
|
||||
sqlParameter.IsMicrosecond = true;
|
||||
}
|
||||
else if (parameter.CustomDbType?.Equals(typeof(Date19))==true)
|
||||
else if (parameter.CustomDbType?.Equals(typeof(Date19)) == true|| _IsIsNanosecond)
|
||||
{
|
||||
sqlParameter.IsNanosecond = true;
|
||||
}
|
||||
else if (parameter.Value is DateTime&&this.Context.CurrentConnectionConfig.ConnectionString.Contains("config_"))
|
||||
{
|
||||
_IsIsNanosecond=sqlParameter.IsNanosecond = this.Context.CurrentConnectionConfig.ConnectionString.Contains("config_ns");
|
||||
_IsMicrosecond = sqlParameter.IsMicrosecond = this.Context.CurrentConnectionConfig.ConnectionString.Contains("config_ms");
|
||||
}
|
||||
result[i]=sqlParameter;
|
||||
i++;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user