mirror of
https://github.com/github/codeql.git
synced 2025-12-22 03:36:30 +01:00
fix sqlite.js test according to Review
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
import sqlite3 from 'sqlite3'
|
import sqlite3 from 'sqlite3'
|
||||||
import { open } from 'sqlite'
|
import { open } from 'sqlite'
|
||||||
|
|
||||||
const unsafe = "unsafe"
|
|
||||||
open({
|
open({
|
||||||
filename: 'database.sqlite',
|
filename: 'database.sqlite',
|
||||||
driver: sqlite3.Database
|
driver: sqlite3.Database
|
||||||
@@ -12,7 +11,7 @@ open({
|
|||||||
db.all('SELECT name,id FROM table1 WHERE id > 5' + " OR id = 1").then(results => {
|
db.all('SELECT name,id FROM table1 WHERE id > 5' + " OR id = 1").then(results => {
|
||||||
console.log(results)
|
console.log(results)
|
||||||
})
|
})
|
||||||
db.run('INSERT INTO table1 (name,id) VALUES (' + `"${unsafe}"` + ',100)').then(results => {
|
db.run('SELECT name,id FROM table1 WHERE id > 5').then(results => {
|
||||||
console.log(results)
|
console.log(results)
|
||||||
})
|
})
|
||||||
db.prepare('SELECT name,id FROM table1 WHERE id > 5'
|
db.prepare('SELECT name,id FROM table1 WHERE id > 5'
|
||||||
|
|||||||
Reference in New Issue
Block a user