Multi-statement queries work in DuckDB but not in duckdb-wasm? #1131
-
I've been using DuckDB-wasm as an in-browser compute engine for web apps (it's awesome, great work!). A few times now, I've run into use cases where I want to execute a query containing multiple statements, like this: This works in the DuckDB python client, but not in wasm (e.g. try it in the shell). Any reason this shouldn't also work in the wasm version? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @holdenmatt, I think single statement logic makes for easier to design/reason around API (problem I can see: what do you return if there are multiple select statement?), but I see this could be useful, idea noted down, thanks! On the short term I would recommend to compose this from the existing pieces (even just splitting into pieces and in a await loop sending them). Splitting user-side is potentially non-trivial, but if you control the input it should be a simpler problem, but medium term it could be a 'nice to have'. |
Beta Was this translation helpful? Give feedback.
Hi @holdenmatt, I think single statement logic makes for easier to design/reason around API (problem I can see: what do you return if there are multiple select statement?), but I see this could be useful, idea noted down, thanks!
On the short term I would recommend to compose this from the existing pieces (even just splitting into pieces and in a await loop sending them). Splitting user-side is potentially non-trivial, but if you control the input it should be a simpler problem, but medium term it could be a 'nice to have'.