Open tronis470 opened 9 months ago
I'm encountering the same issue with duckdb 1.0.0.
Are there any suggested workarounds?
This is caused by Utils::BindParameter not doing anything to handle arrays. JS arrays fall into the IsObject
case, then get converted ToString().Utf8Value()
before being passing onto DuckDB itself, then causing DuckDB to complain that it's receiving a VARCHAR for a column that wants a LIST.
This explains why passing ["a", "b", "c"]
from JS would end up with the error "Type VARCHAR with value 'a,b,c' can't be cast to the destination type LIST". It's doing the same thing as ["a", "b", "c"].toString()
.
I can't pass a list/array as an argument into prepared statements with duckdb-node 0.9.2. Try this script:
Depending on which version you try, you get errors like:
or