Closed worbunkel closed 6 years ago
This is an adjustment to the promise create connection type. It should return a Promise. This change is based on the node-mysql2 docs and source:
async function main() { // get the client const mysql = require('mysql2/promise'); // create the connection const connection = await mysql.createConnection({host:'localhost', user: 'root', database: 'test'}); // query database const [rows, fields] = await connection.execute('SELECT * FROM `table` WHERE `name` = ? AND `age` > ?', ['Morty', 14]); }
I wasn't able to run the tests, but I adjusted them anyway. Let me know if anything doesn't work and I'll update the PR.
The tests are not designed to be run, they test TypeScript regressions in the usage.
@felixfbecker That makes sense. Updated the PR based on review.
This is an adjustment to the promise create connection type. It should return a Promise. This change is based on the node-mysql2 docs and source:
I wasn't able to run the tests, but I adjusted them anyway. Let me know if anything doesn't work and I'll update the PR.