quackdb

Crates.ioquackdb
lib.rsquackdb
version0.5.0
sourcesrc
created_at2023-10-20 20:06:34.964539
updated_at2023-10-30 00:14:41.949751
descriptionErgonomic binding to DuckDB
homepagehttps://github.com/rongcuid/quackdb
repositoryhttps://github.com/rongcuid/quackdb
max_upload_size
id1009346
size41,149
Rongcui Dong (rongcuid)

documentation

https://docs.rs/quackdb

README

QuackDB

A DuckDB API with ergonomic high-level API without sacrificing the ability to go low level.

Compared to duckdb-rs

  • QuackDB avoids lifetime on API where possible
    • Database objects are reference-counted
    • This avoids the need to store parent objects explicitly
  • QuackDB does not attempt to mimic Rusqlite API
  • QuackDB data access and processing is centered around Arrow

API Level

The main API is the high level, safe API.

quackdb-internal contains wrappers over types from libduckdb-sys with Rust types. These types are only used for object lifetime management. Raw FFI handles can be accessed by dereferencing either high level or wrapper structures.

API Support

C API High Level
Database Yes
Connection Yes
Config Yes
Query Arrow
Data Chunks No
Values No
Types Partial
Statements Yes
Appender Yes
Table Functions Almost
Replacement Scans Yes
  • Query results require working with arrow RecordBatch directly
  • Table functions are supported, but it has to work with data chunks directly via FFI
  • Currently, DuckDB types, Arrow types, and Rust types are not fully reconciled

API conventions

  • High level API expose low level handle types as pub handle field
  • High level API follow Rust naming
  • Low level API wraps raw handle and all basic operations
  • Low level API dereferences to raw handle
  • Low level API use Rust types
  • Low level API follow DuckDB naming

Roadmap

  • Arrow streaming support
  • Clean up receivers
  • Clean up table function
  • Remove intermediate handles that does not need Drop implementations
  • Serde support
  • Data chunk support
  • Comprehensive documentation
  • Comprehensive tests
Commit count: 171

cargo fmt