Skip to content

Commit 54ea1af

Browse files
authored
docs: tweaks for the documentation (#69)
1 parent 94b3890 commit 54ea1af

File tree

3 files changed

+48
-20
lines changed

3 files changed

+48
-20
lines changed

.bumpversion.cfg

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[bumpversion]
22
current_version = 4.0.0
3-
commit = True
3+
commit = False
44
tag = False
55

66
[bumpversion:file:CMakeLists.txt]
@@ -15,10 +15,6 @@ replace = questdb-rs/{new_version}/
1515
search = version = "{current_version}"
1616
replace = version = "{new_version}"
1717

18-
[bumpversion:file:questdb-rs/README.md]
19-
search = questdb-rs = "{current_version}"
20-
replace = questdb-rs = "{new_version}"
21-
2218
[bumpversion:file:./questdb-rs/README.md]
2319
search = questdb-rs/{current_version}/
2420
replace = questdb-rs/{new_version}/

questdb-rs/README.md

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,16 @@ InfluxDB Line Protocol (ILP).
99
* [QuestDB Database docs](https://questdb.io/docs/)
1010
* [Docs on InfluxDB Line Protocol](https://questdb.io/docs/reference/api/ilp/overview/)
1111

12-
## Getting Started
12+
## Quick Start
1313

14-
To start using `questdb-rs`, add it to your `Cargo.toml`:
14+
To start using `questdb-rs`, add it as a dependency of your project:
1515

16-
```toml
17-
[dependencies]
18-
questdb-rs = "4.0.0"
16+
```bash
17+
cargo add questdb-rs
1918
```
2019

21-
## Docs
22-
23-
See documentation for the
24-
[`ingress`](https://docs.rs/questdb-rs/4.0.0/questdb/ingress/) module to insert
25-
data into QuestDB via the ILP protocol.
26-
27-
* Latest API docs:
28-
[https://docs.rs/questdb-rs/latest/](https://docs.rs/questdb-rs/latest/)
29-
30-
## Example
20+
Then you can try out this quick example, which connects to a QuestDB server
21+
running on your local machine:
3122

3223
```rust no_run
3324
use questdb::{
@@ -51,6 +42,11 @@ fn main() -> Result<()> {
5142
}
5243
```
5344

45+
## Docs
46+
47+
Most of the client documentation is on the
48+
[`ingress`](https://docs.rs/questdb-rs/4.0.0/questdb/ingress/) module page.
49+
5450
## Crate features
5551

5652
This Rust crate supports a number of optional features, in most cases linked

questdb-rs/src/ingress/mod.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,27 @@ QuestDB instances), call
6565
The two supported transport modes, HTTP and TCP, handle errors very differently.
6666
In a nutshell, HTTP is much better at error handling.
6767

68+
# Health Check
69+
70+
The QuestDB server has a "ping" endpoint you can access to see if it's alive,
71+
and confirm the version of InfluxDB Line Protocol with which you are
72+
interacting:
73+
74+
```shell
75+
curl -I http://localhost:9000/ping
76+
```
77+
78+
Example of the expected response:
79+
80+
```shell
81+
HTTP/1.1 204 OK
82+
Server: questDB/1.0
83+
Date: Fri, 2 Feb 2024 17:09:38 GMT
84+
Transfer-Encoding: chunked
85+
Content-Type: text/plain; charset=utf-8
86+
X-Influxdb-Version: v2.7.4
87+
```
88+
6889
## TCP
6990

7091
TCP doesn't report errors at all to the sender; instead, the server quietly
@@ -232,6 +253,21 @@ However, TCP has a lower overhead than HTTP and it's worthwhile to try out as an
232253
alternative in a scenario where you have a constantly high data rate and/or deal
233254
with a high-latency network connection.
234255

256+
### Timestamp Column Name
257+
258+
InfluxDB Line Protocol (ILP) does not give a name to the designated timestamp,
259+
so if you let this client auto-create the table, it will have the default name.
260+
To use a custom name, create the table using a DDL statement:
261+
262+
```sql
263+
CREATE TABLE sensors (
264+
my_ts timestamp,
265+
id symbol,
266+
temperature double,
267+
humidity double,
268+
) timestamp(my_ts);
269+
```
270+
235271
## Sequential Coupling in the Buffer API
236272

237273
The fluent API of [`Buffer`] has sequential coupling: there's a certain order in

0 commit comments

Comments
 (0)