Update ClickHouse

This commit is contained in:
sunkaixuan
2022-08-13 16:03:42 +08:00
parent 74398420c3
commit bf853eac7b
9 changed files with 26 additions and 15 deletions

View File

@@ -107,7 +107,7 @@ namespace OrmTest
var data6 = orderDb.GetPageList(it => it.Name == "xx", p, it => it.Name, OrderByType.Asc);
Console.Write(p.TotalCount);
List<IConditionalModel> conModels = new List<IConditionalModel>();
conModels.Add(new ConditionalModel() { FieldName = "id", ConditionalType = ConditionalType.Equal, FieldValue = "1", FieldValueConvertFunc=it=>Convert.ToInt32(it) });//id=1
conModels.Add(new ConditionalModel() { FieldName = "Id", ConditionalType = ConditionalType.Equal, FieldValue = "1", FieldValueConvertFunc=it=>Convert.ToInt32(it) });//id=1
var data7 = orderDb.GetPageList(conModels, p, it => it.Name, OrderByType.Asc);
orderDb.AsQueryable().Where(x => x.Id == 1).ToList();

View File

@@ -58,7 +58,7 @@ namespace OrmTest
var json = db.Queryable<Order>().ToJson();
List<int> listInt = db.Queryable<Order>().Select(it => it.Id).ToList();
List<long> listInt = db.Queryable<Order>().Select(it => it.Id).ToList();
var dynamic = db.Queryable<Order>().Select<dynamic>().ToList();

View File

@@ -8,7 +8,8 @@ namespace OrmTest
{
public class Custom
{
public int Id { get; set; }
public long Id { get; set; }
public string Name { get; set; }
}
}

View File

@@ -9,15 +9,15 @@ namespace OrmTest
public class Order
{
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
public int Id { get; set; }
[SugarColumn(IsPrimaryKey = true)]
public long Id { get; set; }
public string Name { get; set; }
public decimal Price { get; set; }
[SugarColumn(IsNullable = true)]
public DateTime CreateTime { get; set; }
[SugarColumn(IsNullable =true)]
public int CustomId { get; set; }
public long CustomId { get; set; }
[SugarColumn(IsIgnore = true)]
public List<OrderItem> Items { get; set; }
}

View File

@@ -8,9 +8,9 @@ namespace OrmTest
[SqlSugar.SugarTable("OrderDetail")]
public class OrderItem
{
[SqlSugar.SugarColumn(IsPrimaryKey =true, IsIdentity =true)]
public int ItemId { get; set; }
public int OrderId { get; set; }
[SqlSugar.SugarColumn(IsPrimaryKey =true)]
public long ItemId { get; set; }
public long OrderId { get; set; }
public decimal? Price { get; set; }
[SqlSugar.SugarColumn(IsNullable = true)]
public DateTime? CreateTime { get; set; }