SELECT * FROM table WHERE id IN ($1) · Issue #129 · brianc/node-postgres (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
Description
I could not figure how to approach the kind of query stated in the title. I have a dynamic list of values, and I need to use it in an IN operator in the query. Apparently node-postgres does not handle array parameters in such cases; also, I could not find any value escaping methods that would allow me to construct the query without using placeholders in this case. Constructing the query template and parameter list dynamically, adding as many placeholders as needed, seems unacceptably burdensome. What is the proper way to perform such a query?