Crate questdb

source ·
Expand description

QuestDB Client Library for Rust

Getting Started

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

[dependencies]
questdb-rs = "2.1.3"

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.

Modules

Fast Ingestion of data into QuestDB

Structs

An error that occurred when using QuestDB client library.

Enums

Category of error.

Type Definitions

A specialized Result type for the crate’s Error type.