Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function (async_done: Function) {
console.log("cancel using query identifier.");
let q: Query = conn.query(sql.PollingQuery("waitfor delay \'00:00:20\';"), function (err) {
if (err) {
Assert.check(err.message.indexOf('Operation canceled') > 0);
}
async_done();
});
q.cancelQuery( err => {
Assert.ifError(err);
});
},
function (async_done:Function) {
conn.prepare(sql.PollingQuery(s), (err: Error, pq: PreparedStatement) => {
Assert.check(!err);
prepared = pq;
async_done();
});
},