Мне интересно, как правильно вводить столбцы и значения?
Например
Код: Выделить всё
public class CourierRow
{
public Guid Id { get; init; }
public string Name { get; init; } = string.Empty;
public decimal Price { get; init; }
public DateTime RandomTime { get; init; }
}
Код: Выделить всё
public class MyClickHouseService(IClickHouseClient clickHouseClient) : IMyClickHouseService
{
public async Task Add(CourierRow courierRow)
{
clickHouseClient.InsertBinaryAsync(
"couriers",
)
}
}
Код: Выделить всё
var columns = new[]{ "id", "name", "price", "random_time" };
var row = new object[] { orders.Id, orders.Name, orders.Price, orders.RandomTime };
await clickHouseClient.InsertBinaryAsync("couriers", columns, [row]);