Closed terbooter closed 6 years ago
I don't think there is a connection.release() method. There is a connection.end(). A poolConnection has a release() method and the typings are present for that.
For example,
import * as mysql from 'promise-mysql';
// standard connection
mysql.createConnection({
...
}).then((connection) => {
connection.end();
});
// pooled connection
const pool = mysql.createPool({
...
});
pool.getConnection().then((connection) => {
connection.release(); // or pool.releaseConnection(connection);
});
Sorry, I was inattentive
Docs says that
But
interface Connection
inindex.d.ts
file miss this method signature