Closed vanerac closed 5 years ago
Code
async function test(){ let pConnection = await pool.getConnection() await sConnection.query(`SELECT * FROM users;`) console.log(`Single connection query end`) await pConnection.query(`SELECT * FROM users;`) await pConnection.release() console.log(`Pool connection end`) } test().then(() =>{console.log(`Function ended`)})
Console output:
Single connection query end Pool connection end
Expected console outut:
Single connection query end Pool connection end Function ended
I don't know if this is a bug or if im doing something wrong, but in case...
I'm going to guess that by closing this it means you figured out that you need to return a promise?
yeah my bad
Code
Console output:
Expected console outut:
I don't know if this is a bug or if im doing something wrong, but in case...