mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-12-27 18:25:47 +08:00
添加ClickHouse数据库支持
This commit is contained in:
@@ -34,6 +34,29 @@ namespace FreeSql.Tests
|
||||
var items = fsql.Select<TestJsonb01Cls1>().ToList();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void TestClickHouse()
|
||||
{
|
||||
var fsql = g.mysql;
|
||||
fsql.Delete<TestJsonb01Cls1>().Where("1=1").ExecuteAffrows();
|
||||
|
||||
var item = new TestJsonb01Cls1
|
||||
{
|
||||
jsonb01 = new List<int> { 1, 5, 10, 20 },
|
||||
jsonb02 = new List<long> { 11, 51, 101, 201 },
|
||||
jsonb03 = new List<string> { "12", "52", "102", "202" },
|
||||
};
|
||||
fsql.Insert(item).ExecuteAffrows();
|
||||
|
||||
}
|
||||
[FreeSql.DataAnnotations.Table(Name = "ClickHouseTest")]
|
||||
public class ClickHouse
|
||||
{
|
||||
public long Id { get; set; }
|
||||
|
||||
public string Name { get; set; }
|
||||
}
|
||||
|
||||
public class TestJsonb01Cls1
|
||||
{
|
||||
public Guid id { get; set; }
|
||||
|
||||
Reference in New Issue
Block a user