Skip to content

Commit 6bf4c21

Browse files
committed
- 调整 命名空间 FreeSql.Provider.ClickHouse.Attributes -> FreeSql.DataAnnotations;#1815
1 parent 2754fe2 commit 6bf4c21

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

Providers/FreeSql.Provider.ClickHouse/Attributes/ClickHousePartitionAttribute.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
using System.Collections.Generic;
33
using System.Text;
44

5-
namespace FreeSql.Provider.ClickHouse.Attributes
5+
namespace FreeSql.DataAnnotations
66
{
77
[AttributeUsage(AttributeTargets.Property)]
88
public class ClickHousePartitionAttribute : Attribute

Providers/FreeSql.Provider.ClickHouse/ClickHouseCodeFirst.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
using System.Reflection;
1212
using FreeSql.Internal.ObjectPool;
1313
using ClickHouse.Client.ADO;
14-
using FreeSql.Provider.ClickHouse.Attributes;
14+
using FreeSql.DataAnnotations;
1515

1616
namespace FreeSql.ClickHouse
1717
{
@@ -97,8 +97,7 @@ public override DbInfoResult GetDbInfo(Type type)
9797
{
9898
var arrayDbType = $"Array({value.dbtype})";
9999
var defaultArray = new ArrayList(0);
100-
return new DbInfoResult(Convert.ToInt32(DbType.Object), arrayDbType, arrayDbType, false,
101-
defaultArray);
100+
return new DbInfoResult(Convert.ToInt32(DbType.Object), arrayDbType, arrayDbType, false, defaultArray);
102101
}
103102
}
104103

@@ -176,8 +175,7 @@ protected override string GetComparisonDDLStatements(params TypeSchemaAndName[]
176175
if (tb == null)
177176
throw new Exception(CoreStrings.S_Type_IsNot_Migrable(obj.tableSchema.Type.FullName));
178177
if (tb.Columns.Any() == false)
179-
throw new Exception(
180-
CoreStrings.S_Type_IsNot_Migrable_0Attributes(obj.tableSchema.Type.FullName));
178+
throw new Exception(CoreStrings.S_Type_IsNot_Migrable_0Attributes(obj.tableSchema.Type.FullName));
181179
var tbname = _commonUtils.SplitTableName(tb.DbName);
182180
if (tbname?.Length == 1)
183181
tbname = new[] { database, tbname[0] };

Providers/FreeSql.Provider.ClickHouse/Curd/ClickHouseUpdate.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ public override void ToSqlExtension110(StringBuilder sb, bool isAsTableSplited)
169169
var colsql = _noneParameter ? _commonUtils.GetNoneParamaterSqlValue(_paramsSource, "u", col, col.Attribute.MapType, val) :
170170
_commonUtils.QuoteWriteParamterAdapter(col.Attribute.MapType, _commonUtils.QuoteParamterName($"p_{_paramsSource.Count}"));
171171

172-
//判断是否是DateTime类型,如果是DateTime类型,需要转换成ClickHouse支持的时间格式
172+
//判断是否是DateTime类型,如果是DateTime类型,需要转换成ClickHouse支持的时间格式 #1813
173173
if (col.Attribute.MapType == typeof(DateTime) || col.Attribute.MapType == typeof(DateTime?) )
174174
{
175175
//获取当前实时区

0 commit comments

Comments
 (0)