I would rather use a package like sqlstring to ease the query creation and prevent nasty SQL injections. In any case the resulting SQL query should look like;
INSERT INTO table (column1) VALUES (1), (2), (3), (2);
const numbers = [1, 2, 3, 2];
const values = numbers.map (x => `(${x})`).join (', ');
const query = `INSERT INTO table (column1) VALUES ${values};`;
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…