From a9003ad1cda5b5b99d183a04233edd30f1f0a6f4 Mon Sep 17 00:00:00 2001 From: Raphael DALMON Date: Fri, 14 Nov 2025 16:13:46 +0100 Subject: [PATCH 1/2] docs: add missing documentation for decimal datatype and protocol version 3 --- README.md | 1 + questdb-rs/src/ingress/mod.md | 15 +++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/README.md b/README.md index 158a0df1..074097e9 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,7 @@ These protocol versions are supported over both HTTP and TCP. | ------- | ------------------------------------------------------------ | --------------------- | | **1** | Over HTTP it's compatible with InfluxDB Line Protocol (ILP) | All QuestDB versions | | **2** | 64-bit floats sent as binary, adds n-dimensional arrays | 9.0.0+ (2025-07-11) | +| **3** | adds decimals | 9.2.0+ (2025-11-14) | ## Getting Started diff --git a/questdb-rs/src/ingress/mod.md b/questdb-rs/src/ingress/mod.md index 16806795..559504d7 100644 --- a/questdb-rs/src/ingress/mod.md +++ b/questdb-rs/src/ingress/mod.md @@ -270,6 +270,21 @@ the configuration string: `protocol_version=2;`. **Note**: QuestDB server version 9.0.0 or later is required for array support. +## Decimal Datatype + +The [`Buffer::column_dec`](Buffer::column_dec) method supports efficient ingestion of decimals using several convenient types: + +- floating point representation with `&str` +- decimals from the [`bigdecimal`](https://docs.rs/bigdecimal) crate +- decimals from the [`rust_decimal`](https://docs.rs/rust_decimal) crate + +You must use protocol version 3 to ingest decimals. The HTTP transport will +automatically enable it as long as you're connecting to an up-to-date QuestDB +server (version 9.2.0 or later), but with TCP you must explicitly specify it in +the configuration string: `protocol_version=3;`. + +**Note**: QuestDB server version 9.2.0 or later is required for decimal support. + ## Timestamp Column Name The InfluxDB Line Protocol (ILP) does not give a name to the designated timestamp, From a06006cd56b2468463edba139d772bffd54482a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Dalmon?= <38668811+RaphDal@users.noreply.github.com> Date: Fri, 14 Nov 2025 16:18:27 +0100 Subject: [PATCH 2/2] Update questdb-rs/src/ingress/mod.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- questdb-rs/src/ingress/mod.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/questdb-rs/src/ingress/mod.md b/questdb-rs/src/ingress/mod.md index 559504d7..c3849fdd 100644 --- a/questdb-rs/src/ingress/mod.md +++ b/questdb-rs/src/ingress/mod.md @@ -274,7 +274,7 @@ the configuration string: `protocol_version=2;`. The [`Buffer::column_dec`](Buffer::column_dec) method supports efficient ingestion of decimals using several convenient types: -- floating point representation with `&str` +- floating-point representation with `&str` - decimals from the [`bigdecimal`](https://docs.rs/bigdecimal) crate - decimals from the [`rust_decimal`](https://docs.rs/rust_decimal) crate