Open Callum-A opened 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.
LONG
: This approach should get you sorted for the LONG
datatype.BINARY
: If you need to insert BINARY
data at the moment your only option is to use a PgWire client at the moment.LONG256
: There is ILP support (at the protocol level) for LONG256, but it's not implemented yet: https://questdb.io/docs/reference/api/ilp/columnset-types/#long256 - Is this something you'd need? What's your use case around it?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.
Any update on this?
Is there an accepted approach in Rust to write LONG / LONG256 / BINARY types using the Buffer's provided?