Skip to content

namedPlaceholders with IN clause #196

Open
@steven10172

Description

@steven10172

It would be nice to have namedPlaceholders convert arrays of data into an IN clause.

I would like the following to be possible:

var parms = {
   keys: [1,2,3,4,5,6,7]
};

db.pool.execute('SELECT id FROM table WHERE id IN (:keys)', parms, function(res, err) {
});

It should execute to the following:

SELECT id FROM table WHERE id IN (?,?,?,?,?,?,?)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions