Closed as not planned
Description
What is the problem this feature will solve?
Being able to use the SQL IN operator is not possible without a workaround; see https://stackoverflow.com/questions/79441096/using-sql-in-operator-with-databasesync-in-node-sqlite
What is the feature you are proposing to solve the problem?
Being able to do a query like this, where parameters to an IN operator in the WHERE clause can be substituted by an array of values:
const stmt = conn.prepare(`select name from people where id in (?)`);
res = stmt.get([100,200,300])
What alternatives have you considered?
Only the workaround in the above linked Stackoverflow question, where you have to make provision for each value individually in the query (which would require a new prepared statement each time):
const values = [100,200,300];
// 3 values, so need 3 params: ?,?,?
const params = values.map(_=>'?').join(',');
const stmt = conn.prepare(`select name from people where id in (${params})`);
res = stmt.get(values);
Metadata
Metadata
Assignees
Type
Projects
Status
Awaiting Triage