mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
13 lines
372 B
JavaScript
13 lines
372 B
JavaScript
// Adapted from https://github.com/tediousjs/node-mssql#readme
|
|
const sql = require('mssql')
|
|
|
|
async () => {
|
|
try {
|
|
const pool = await sql.connect('mssql://username:password@localhost/database')
|
|
const result = await sql.query`select * from mytable where id = ${value}`
|
|
console.dir(result)
|
|
} catch (err) {
|
|
// ... error checks
|
|
}
|
|
}
|