mysql2 icon indicating copy to clipboard operation
mysql2 copied to clipboard

Missing releaseConnection?

Open melroy89 opened this issue 7 years ago • 4 comments

As described over here: https://github.com/sidorares/node-mysql2

// For pool initialization, see above
pool.getConnection(function(conn) {
   // Do something with the connection
   conn.query(/* ... */);
   // Don't forget to release the connection when finished!
   pool.releaseConnection(conn);
})

It should be possible to also call pool.releaseConnection. Currently it says: 'Property 'releaseConnection' does not exist on type 'Pool'.

I don't know if conn.release() is also fine, or should this example be updated on their page (sidorares)?

Correct me if I'm wrong.

Regards, Melroy

melroy89 avatar May 24 '18 23:05 melroy89

We had to remove it, several methods are not yet available in this type. I found "releaseConnection" and "prepare" to be missing for example

Wallethub avatar Jun 15 '19 15:06 Wallethub

You had to remove this? So you'll add them again or :S?

melroy89 avatar Jun 15 '19 18:06 melroy89

It would be good to update the Docs.

the-launch-tech avatar Dec 16 '19 01:12 the-launch-tech

Is it updated yet?

rajuAhmed1705 avatar Nov 08 '21 12:11 rajuAhmed1705