Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing releaseConnection? #23

Open
melroy89 opened this issue May 24, 2018 · 4 comments
Open

Missing releaseConnection? #23

melroy89 opened this issue May 24, 2018 · 4 comments

Comments

@melroy89
Copy link

melroy89 commented May 24, 2018

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
Copy link

Wallethub commented Jun 15, 2019

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
Copy link
Author

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

@the-launch-tech
Copy link

It would be good to update the Docs.

@rajuAhmed1705
Copy link

Is it updated yet?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants