I’ve written this test query:
<code> const [results] = await connection.execute(
`
SELECT * FROM providers WHERE id IN (${userIds.join(',')})
`,
);
</code>
<code> const [results] = await connection.execute(
`
SELECT * FROM providers WHERE id IN (${userIds.join(',')})
`,
);
</code>
const [results] = await connection.execute(
`
SELECT * FROM providers WHERE id IN (${userIds.join(',')})
`,
);
However it returns mysql.QueryResult
. And given that this array may contain thousands of records, I don’t want to do this ridiculous JSON.parse(JSON.stringify(results))
.