Skip to content

Latest commit

 

History

History
 
 

questdb-rs

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

QuestDB Client Library for Rust

Getting Started

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

[dependencies]
questdb-rs = "3.0.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.