Overview of DuckDB Node API
mainThe DuckDB Node API is a high-level API designed for Node.js applications to use DuckDB. It provides a more ergonomic interface than the low-level @duckdb/node-bindings package, which adheres closely to the DuckDB C API.
Key advantages over the legacy duckdb-node package include:
- Native Promise support: No need for external async wrappers like
duckdb-async. - DuckDB-native design: Unlike
sqlite3-based wrappers, this is built specifically for DuckDB's capabilities. - Data Integrity: Lossless and efficient support for all DuckDB data types.
- Binary-based: It wraps released DuckDB binaries rather than requiring a local rebuild of DuckDB.
- Full Feature Set: Built on the DuckDB C API, exposing more functionality than previous Node implementations.