Questdb 7.3.10 BulkCopy 问题
1185497683 opened this issue · comments
QuestDB版本:7.3.10
问题描述:插入之后,questdb界面查询显示时间是空
代码如下:
public class Test0111
{
public long Id { get; set; }
public string Name { get; set; }
public decimal Price { get; set; }
public DateTime CreateTime { get; set; }
public long CustomId { get; set; }
public double Value { get; set; }
}
[HttpGet(Name = "GetWeatherForecast")]
public IEnumerable<WeatherForecast> Get()
{
IFreeSql fsql = new FreeSql.FreeSqlBuilder()
.UseConnectionString(FreeSql.DataType.QuestDb,
@"host=localhost;port=8812;username=admin;password=quest;database=qdb;ServerCompatibilityMode=NoTypeLoading;") //连接字符串
.UseMonitorCommand(cmd => Console.WriteLine($"Sql:{cmd.CommandText}"))
.UseQuestDbRestAPI("localhost:9000", "admin", "quest") //RestAPI,建议开启
.Build();
fsql.CodeFirst.SyncStructure<Test0111>();
var count= fsql.Insert(new List<Test0111>() {
new Test0111(){
CreateTime=DateTime.Now,
CustomId=1, Name="test",
Price=1,
Value=1 }
}).ExecuteBulkCopy();
var list = fsql.Select<Test0111>().ToList();
我这边测试没有复现,你有没有安装其他 Provider? 例如FreeSql.Provider.Clickhouse
只有freesql和questdb,使用的是.net 8,windows 10环境, 没有安装任何其它东西。
加我q 963922242,看看什么情况
时期格式问题,Windows 日期格式中包含 星期
处理方式:
1.插入时格式化时间格式
2.调整QuestDb所在的服务器为正常时间格式
thanks