Skip to content

SELECT * FROM table WHERE id IN ($1) #129

Closed
@lanzz

Description

@lanzz

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions