mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-23 13:06:50 +08:00
Fix QuestDb insert failed when include double type column
This commit is contained in:
parent
4ca09393f5
commit
4734c32b17
@ -30,10 +30,10 @@ namespace OrmTest
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var insertObj = new Order() { Id = 1, Name = "order1",Price=0 };
|
var insertObj = new Order() { Id = 1, Name = "order1",Price=0 ,Value = 10.133};
|
||||||
var updateObjs = new List<Order> {
|
var updateObjs = new List<Order> {
|
||||||
new Order() { Id = SnowFlakeSingle.Instance.NextId(), Name = "order11", Price=0 },
|
new Order() { Id = SnowFlakeSingle.Instance.NextId(), Name = "order11", Price=0 ,Value = 0.242},
|
||||||
new Order() { Id = SnowFlakeSingle.Instance.NextId(), Name = "order12" , Price=0}
|
new Order() { Id = SnowFlakeSingle.Instance.NextId(), Name = "order12" , Price=0,Value = 3.343}
|
||||||
};
|
};
|
||||||
|
|
||||||
var x = db.Insertable(updateObjs).RemoveDataCache().IgnoreColumns(it => it.CreateTime).UseParameter().ExecuteCommand();
|
var x = db.Insertable(updateObjs).RemoveDataCache().IgnoreColumns(it => it.CreateTime).UseParameter().ExecuteCommand();
|
||||||
|
@ -19,6 +19,9 @@ namespace OrmTest
|
|||||||
public DateTime CreateTime { get; set; }
|
public DateTime CreateTime { get; set; }
|
||||||
[SugarColumn(IsNullable =true)]
|
[SugarColumn(IsNullable =true)]
|
||||||
public long CustomId { get; set; }
|
public long CustomId { get; set; }
|
||||||
|
|
||||||
|
public double Value { get; set; }
|
||||||
|
|
||||||
[SugarColumn(IsIgnore = true)]
|
[SugarColumn(IsIgnore = true)]
|
||||||
public List<OrderItem> Items { get; set; }
|
public List<OrderItem> Items { get; set; }
|
||||||
}
|
}
|
||||||
|
@ -82,7 +82,7 @@ namespace SqlSugar
|
|||||||
{
|
{
|
||||||
return $" cast('{it.Value.ObjToDate().ToString("yyyy-MM-dd HH:mm:ss.ffffff")}' as timestamp)";
|
return $" cast('{it.Value.ObjToDate().ToString("yyyy-MM-dd HH:mm:ss.ffffff")}' as timestamp)";
|
||||||
}
|
}
|
||||||
else if (it.Value is int || it.Value is long ||it.Value is short || it.Value is short || it.Value is byte)
|
else if (it.Value is int || it.Value is long ||it.Value is short || it.Value is short || it.Value is byte || it.Value is double)
|
||||||
{
|
{
|
||||||
return it.Value;
|
return it.Value;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user