types / mysql2

Typings for https://github.com/sidorares/node-mysql2
ISC License
42 stars 23 forks source link

Missing releaseConnection? #23

Open melroy89 opened 6 years ago

melroy89 commented 6 years ago

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

Wallethub commented 5 years ago

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

melroy89 commented 5 years ago

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

the-launch-tech commented 4 years ago

It would be good to update the Docs.

rajuAhmed1705 commented 2 years ago

Is it updated yet?