Client should skip columns if value is null
javier opened this issue · 1 comments
javier commented
When adding columns to the sender, if we pass a null value, as in
sender.table('prices').symbol('instrument', 'EURUSD')
.floatColumn('bid', null).at(Date.now(), 'ms');
It would be convenient that the column was ignored, rather than raising an error. It would make things easier for programmatic access
javier commented
Current workaround is something like
// start building the sender with the initial required columns
let builder = sender.table('prices').symbol('instrument', 'EURUSD')
.floatColumn('bid', 1.0197);
// conditionally add the ask column
if (includeAsk) {
builder = builder.floatColumn('ask', 1.0224);
}
// finalize the builder with the timestamp
await builder.at(Date.now(), 'ms');