Support array arguments in prepared statements
See https://github.com/duckdb/duckdb-wasm/issues/441#issuecomment-986913723
Right now, we just JSON.stringify the arguments here:
https://github.com/duckdb/duckdb-wasm/blob/ffa9210415e394fa84f0c769a54ef86b169bc2ab/packages/duckdb-wasm/src/bindings/bindings_base.ts#L197-L210
and then unpack them here:
https://github.com/duckdb/duckdb-wasm/blob/ffa9210415e394fa84f0c769a54ef86b169bc2ab/lib/src/webdb.cc#L219-L242
We probably just need to extend rapidjson::Document -> std::vector<duckdb::Value>.
any movement here? would love to use this
in my case i hacked around this by doing:
const bindingIndexes = rowIds.map((_, i) => `?`).join(',');
...
`SELECT * FROM table WHERE row_id in (${bindingIndexes})`,
{ bindings: rowIds }
but a little tedious and would be especially tricky if i had any other bindings
Apologies for bumping, but I would also love to see this fixed — we are now using DuckDB-Wasm for SQL code cells in Observable Framework.