2 releases (1 stable)

Uses new Rust 2021

new 2.1.0 Aug 5, 2022
0.0.1 Aug 4, 2022

#248 in Database interfaces

33 downloads per month

Apache-2.0

105KB
2K SLoC

QuestDB Client Library for Rust

Getting Started

To start using questdb-rs add it to your Cargo.toml:

[dependencies]
questdb-rs = "2.1.0"

Docs

See documentation for the ingress module to insert data into QuestDB via the ILP protocol.

Example

use questdb::{
    Result,
    ingress::{
        Sender,
        Buffer,
        SenderBuilder}};

fn main() -> Result<()> {
   let mut sender = SenderBuilder::new("localhost", 9009).connect()?;
   let mut buffer = Buffer::new();
   buffer
       .table("sensors")?
       .symbol("id", "toronto1")?
       .column_f64("temperature", 20.0)?
       .column_i64("humidity", 50)?
       .at_now()?;
   sender.flush(&mut buffer)?;
   Ok(())
}

C, C++ and Python APIs

This crate is also exposed as a C and C++ API and in turn exposed to Python.

Community

If you need help, have additional questions or want to provide feedback, you may find us on Slack.

You can also sign up to our mailing list to get notified of new releases.

Dependencies

~6.5–9MB
~232K SLoC