vertica / vertica-nodejs

Official native node.js client for the Vertica Analytics Database.
https://www.vertica.com/
Apache License 2.0
12 stars 14 forks source link

Prepared statement with IN clause: Passing array as of the parameters in values array does not work. #142

Open mayurbangar opened 5 months ago

mayurbangar commented 5 months ago

Query: SELECT * FROM TABLE WHERE lastName=? and firstName IN (?)

Values: ['Smith', ['John', 'Joe', 'Jon']]

Final query that runs in db is - SELECT * FROM TABLE WHERE lastName='Smith' and firstName in ('{{John,Joe,John}}')

Expected query - SELECT * FROM TABLE WHERE lastName='Smith' and firstName in ('John', 'Joe', 'Jon')

There was a function Vertica.quote in the vertica driver (https://www.npmjs.com/package/vertica) which used to work as expected.