Skip to content

Latest commit

 

History

History
57 lines (42 loc) · 1.41 KB

README.md

File metadata and controls

57 lines (42 loc) · 1.41 KB

QuestDB Client Library for Rust

Getting Started

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

[dependencies]
questdb-rs = "3.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,
        TimestampNanos}};

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(TimestampNanos::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.