Promise Pool: Inconsistent types, missing releaseConnection function
Hi,
I'm looking at implementing a connection pool, using the promise entry, but as I can see here there isn't a releaseConnection function.
Additionally, when looking at the standard connection pool types, the releaseConnection method is not typed at all.
there is a PromiseConnection.release - https://github.com/sidorares/node-mysql2/blob/131c6b852127bc3af33f542f60231bf19cf99509/promise.js#L87-L89 which is typed here https://github.com/sidorares/node-mysql2/blob/dbb344e89a1cc8bb457b24e67b07cdb3013fe844/promise.d.ts#L85
You're right, it is. Couldn't find it in the documentation.
What about the types for releaseConnection on the standard pool?
You're right, it is. Couldn't find it in the documentation.
I think the promise wrapper is increasingly becoming the most popular api and deserve place at the beginning of readme, while callback style api can reuse documentation from mysqljs/mysql
What about the types for
releaseConnectionon the standard pool?
looks like it's outdated, now deprecated PoolConnection.end() used to be a way to release connection back into the pool
@perry-mitchell would you like to contribute a fix to missing typings? If you can think of some test harness that would be awesome ( have a unit test in TS that can both run without runtime errors and pass static type checks )
I'll close this one as we also discuss same issue in #1761