questdb / c-questdb-client

Rust, C and C++ client for QuestDB InfluxDB Line Protocol
Apache License 2.0
47 stars 13 forks source link

Support for LONG, BINARY types with rust client #75

Open Callum-A opened 5 months ago

Callum-A commented 5 months ago

Is there an accepted approach in Rust to write LONG / LONG256 / BINARY types using the Buffer's provided?

amunra commented 5 months ago

The Rust client is an ILP client. ILP is a text protocol that supports a subset of all the QuestDB types: Oher types are targeted via datatypes conversions when the server receives the data.

The general approach here is to issue a SQL CREATE TABLE statement with the desired schema ahead of ingesting into it via the ILP clients.

In other words, if you send an integer, QuestDB will generally "guess" that it's an INT, but you can force it to be a SHORT or a LONG providing a schema in advance.

If you've created the table already, use an ALTER TABLE statement.

Callum-A commented 5 months ago

It feels like my limitations are mainly with the client then. For example I have a couple u128 types in Rust I'd love to store as LONGs on the table, the DDL part is fine and creating the table works. However due to the lack of a .column_u128 .column_u64 I am unable to store that data via Rust code.

Callum-A commented 4 months ago

Any update on this?