1
0
mirror of https://github.com/matt-fidd/stratos.git synced 2026-01-01 16:19:26 +00:00

Consistent SQL query formatting

This commit is contained in:
2022-02-25 14:44:35 +00:00
parent 2fac6e7aba
commit 57af81cc98
4 changed files with 87 additions and 23 deletions

View File

@@ -549,9 +549,10 @@ async function insertData(dbOptions) {
const qs = '?, '.repeat(Object.keys(
dataToInsert).length).slice(0, -2);
const sql = `INSERT INTO ${table} ` +
const sql = `
insert into ${table} ` +
`(${Object.keys(dataToInsert)})` +
` VALUES ` +
` values ` +
`(${qs});`;
console.log(sql);