questdb / nodejs-questdb-client

QuestDB Node.js Client
35 stars 8 forks source link

Missing method to insert binary data #19

Closed fritzdimmel closed 11 months ago

fritzdimmel commented 1 year ago

Hi, in the QuestDB spec there's a column type "binary". We want to use this column type to store base64 encoded data. Unfortunately, there's no "binaryColumn" method in sender.js. Is this planned or is there any other way to insert binary data using this library? Thanks

glasstiger commented 11 months ago

Hi, I am probably very late to the party, but the short answer is: no. QuestDB clients use ILP (InfluxDB Line Protocol) under the hood, and this protocol is text based. But if your data is already base64 encoded you could just create a STRING column in QuestDB, and ingest the binary data in base64 encoded format. Of course, when you query the table you will need to decode it back to binary.

glasstiger commented 11 months ago

There are plans to change QuestDB clients to use binary protocol, and ditch ILP. When that happens we should be able to add a "binaryColumn()" method to all clients.

fritzdimmel commented 11 months ago

Hi, thanks for letting me know. Looking forward to some "native" implementation in the future. Until then, we'll stick with encode/decode wrappers. Thanks