4 ms·
> Common database drivers like PGSQL, MySQL, SQLite etc. don't accept arrays of values for parameterized queries. One workaround to that is passing the array a
by Akronymus 5y ago
> Common database drivers like PGSQL, MySQL, SQLite etc. don't accept arrays of values for parameterized queries.
One workaround to that is passing the array as a string with some separator, deconstructing it into a temp table and then using that table as a array when it is part of a stored procedure.
- matharmin 5y agoEven better, you can pass it in a JSON array, and use the built-in JSON functionality to iterate through it. I started doing this in SQLite, and it made some queries a lot cleaner.