mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-19 12:28:15 +08:00
Clickhouse Array泛型插入测试
This commit is contained in:
@ -114,7 +114,22 @@ namespace FreeSql.Tests.ClickHouse
|
||||
[Fact]
|
||||
public void ArrayBoolMappingSync()
|
||||
{
|
||||
_fsql.CodeFirst.SyncStructure(typeof(ArrayMappingTest));
|
||||
_fsql.CodeFirst.SyncStructure(typeof(ArrayMappingTestSimple));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 测试Array类型映射
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void ArrayBoolMappingInsert()
|
||||
{
|
||||
_ = _fsql.Insert(new ArrayMappingTestSimple
|
||||
{
|
||||
Name = "daily",
|
||||
Tags1 = new List<string>() { "a", "b", "c" },
|
||||
Tags2 = new List<int>() { 1, 2, 3, 4 },
|
||||
Tags3 = new List<bool>() { true, true, false }
|
||||
}).ExecuteAffrows();
|
||||
}
|
||||
}
|
||||
|
||||
@ -153,4 +168,18 @@ namespace FreeSql.Tests.ClickHouse
|
||||
|
||||
[Column(Name = "tags7")] public IEnumerable<bool> Tags7 { get; set; }
|
||||
}
|
||||
|
||||
[Table(Name = "table_test_array_simple")]
|
||||
public class ArrayMappingTestSimple
|
||||
|
||||
{
|
||||
[Column(Name = "name", IsPrimary = true)]
|
||||
public string Name { get; set; }
|
||||
|
||||
[Column(Name = "tags1")] public IEnumerable<string> Tags1 { get; set; }
|
||||
|
||||
[Column(Name = "tags2")] public List<int> Tags2 { get; set; }
|
||||
|
||||
[Column(Name = "tags3")] public IEnumerable<bool> Tags3 { get; set; }
|
||||
}
|
||||
}
|
@ -34,6 +34,11 @@
|
||||
测试Array类型映射
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:FreeSql.Tests.ClickHouse.ClickHouseTest3.ArrayBoolMappingInsert">
|
||||
<summary>
|
||||
测试Array类型映射
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:FreeSql.Tests.ClickHouse.CollectDataEntityUpdate01">
|
||||
<summary>
|
||||
实时数据
|
||||
|
Reference in New Issue
Block a user