mirror of
https://github.com/lana-k/sqliteviz.git
synced 2025-12-07 18:48:55 +08:00
add tests for dbUtils module #27
This commit is contained in:
@@ -11,7 +11,7 @@ export default {
|
||||
|
||||
getInsertStmt (columns) {
|
||||
const colList = `"${columns.join('", "')}"`
|
||||
const params = columns.map(() => '?').join(' ,')
|
||||
const params = columns.map(() => '?').join(', ')
|
||||
return `INSERT INTO csv_import (${colList}) VALUES (${params});`
|
||||
},
|
||||
|
||||
@@ -36,9 +36,9 @@ export default {
|
||||
}
|
||||
default: type = 'TEXT'
|
||||
}
|
||||
result += `"${col}" ${type},`
|
||||
result += `"${col}" ${type}, `
|
||||
})
|
||||
result = result.replace(/.$/, ');')
|
||||
result = result.replace(/,\s$/, ');')
|
||||
return result
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user