To start using questdb-rs
add it to your Cargo.toml
:
[dependencies]
questdb-rs = "3.0.0"
See documentation for the ingress
module to insert data into QuestDB via the ILP protocol.
- Latest API docs: https://docs.rs/questdb-rs/latest/
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(())
}
This crate is also exposed as a C and C++ API and in turn exposed to Python.
- This project's GitHub page for the C and C++ API.
- Python bindings.
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.