Skip to content

Commit

Permalink
Remove promise return from poolConnection release and destroy as mysq…
Browse files Browse the repository at this point in the history
…ljs doesn't take a callback. Closes #77
  • Loading branch information
Luke Bonaccorsi committed Jan 5, 2018
1 parent abe68b8 commit 4ca8566
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,11 @@ Promise.using(getSqlConnection(), function(connection) {
At the moment only simple basics tests are implemented using Mocha.
To run the tests, you need to connect to a running MySQL server. A database or write permissions are not required.

If you have docker, you can run a docker container bound to the mysql port with the command:
```bash
docker run -p 3306:3306 --name mysql_container -e MYSQL_ROOT_PASSWORD=password -d mysql
```

Start the test suite with

```bash
Expand Down
4 changes: 2 additions & 2 deletions lib/poolConnection.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ var poolConnection = function(_connection) {
inherits(poolConnection, Connection);

poolConnection.prototype.release = function() {
return promiseCallback.apply(this.connection, ['release', arguments]);
this.connection.release();
};

poolConnection.prototype.destroy = function() {
return promiseCallback.apply(this.connection, ['destroy', arguments]);
this.connection.destroy();
};

module.exports = poolConnection;
4 changes: 1 addition & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4ca8566

Please sign in to comment.