Closed naturalethic closed 8 years ago
Nope, I tested against a private project. Perhaps you could add some unit tests. :)
Or -- did you mean an example of how to use it for the docs? If so, everything from before worked as documented. The new stuff is:
var mysql = require('promise-mysql')
var pool = mysql.createPool(config) // Returns a connection pool (not a promise)
pool.getConnection().then(function(connection))
connection.release()
pool.end().then(function)
Unit tests should be written before you merge for sure. I just fixed a bug in the PR.
I only saw the old dev/pool
branch and somehow overlooked this pull request. :-(
So I also added a working implementation of the connection pool ( https://github.com/pdaether/node-promise-mysql/tree/dev/pool ) and created some basic tests with mocha.
Maybe we can combine our efforts to get the tests and this feature into the main branch?
As your contribution is more thorough, I recommend it be merged over mine.
@pdaether Can you submit a pull request with your changes? I'll do a review and merge it if it all looks good.
Merged #10 instead
Thanks for this Joshua, it all seems to make sense. One thing before I merge, do you have an example of it working?