!24 修复clickhouse数据类型对应的处理

Merge pull request !24 from Robin/master
This commit is contained in:
sunkaixuan
2022-10-28 08:43:18 +00:00
committed by Gitee
2 changed files with 4 additions and 1 deletions

View File

@@ -98,7 +98,7 @@ namespace SqlSugar.ClickHouse
{
date = UtilMethods.GetMinDate(this.Context.CurrentConnectionConfig);
}
return "'" + date.ToString("yyyy-MM-dd HH:mm:ss.fff") + "'";
return "'" + date.ToString("yyyy-MM-dd HH:mm:ss") + "'";
}
private string GetString(object value)

View File

@@ -462,6 +462,9 @@ namespace SqlSugar
{
if (Regex.IsMatch(dbTypeName, @"\(.+\)"))
{
if (Regex.IsMatch(dbTypeName, @"SimpleAggregateFunction"))
dbTypeName = Regex.Match(dbTypeName, @"((?<=,\s)[^Nullable]\w+)|((?<=Nullable\()\w+)").Value;
else
dbTypeName = Regex.Replace(dbTypeName, @"\(.+\)", "");
}
dbTypeName = dbTypeName.Trim();