holdenmatt / duckdb-wasm-kit

Hooks and utilities to make it easier to use duckdb-wasm in React apps.
https://www.npmjs.com/package/duckdb-wasm-kit
MIT License
138 stars 6 forks source link

Support synchornous DuckDB instance to allow user-defined functions (UDFs) #20

Open alexkreidler opened 2 months ago

alexkreidler commented 2 months ago

Awesome library, thank you!

Currently the synchronous DuckDB bindings allow creating UDFs, internal code.

There are some reasons why UDFs are not supported with the async bindings: https://github.com/duckdb/duckdb-wasm/issues/159#issue-951939362

It would be nice to have an option for the useDuckDb() hook to choose the sync version of duckdb. Hopefully none of the other helper functions like insertFile depend specifically on the async version.