1 stable release
1.0.0 | Sep 8, 2024 |
---|---|
0.1.1 |
|
0.1.0 |
|
#24 in #duck-db
98 downloads per month
53KB
1.5K
SLoC
duckdb2
Simple DuckDB binding for Rust
Usage
cargo add duckdb2
use duckdb2::{Database, Config};
fn main() {
let config = Config::new();
let db = Database::open_with("./test.db", config).unwrap();
let conn = db.connect().unwrap();
conn.execute("CREATE TABLE IF NOT EXISTS users (id int32, age int8)").unwrap();
conn.execute("INSERT INTO users VALUES (1, 18), (2, 22), (3, 32);").unwrap();
let query = conn.query("SELECT * FROM users").unwrap();
dbg!(query);
}
Dependencies
~14MB
~183K SLoC