CodeFoodPixels / node-promise-mysql

A wrapper for mysqljs/mysql that wraps function calls with Bluebird promises.
MIT License
338 stars 63 forks source link

Implemented the connection pool and added basic tests. #10

Closed pdaether closed 8 years ago

pdaether commented 8 years ago

See lukeb-uk/node-promise-mysql/pull/9

pdaether commented 8 years ago

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.

Start the test suite with

DB_HOST=localhost DB_USER=user DB_PWD=pwd npm test
CodeFoodPixels commented 8 years ago

Looks good to me and test all pass, merging!

naturalethic commented 8 years ago

Can you push this to npm as well?

CodeFoodPixels commented 8 years ago

I have a little merging to do between master and the pool branch, which I'm doing now, but I will push as soon as I've finished

CodeFoodPixels commented 8 years ago

@naturalethic this has been pushed to npm now.

pdaether commented 8 years ago

:+1: Thanks!

naturalethic commented 8 years ago

big ups!

naturalethic commented 8 years ago

Oops -- I just noticed there is no way to release connection. I see the incomplete tests in there for that as well. @pdaether you want to add that?

pdaether commented 8 years ago

Yes, i can add this. At the moment, i only use this module in an high traffic service without transaction and other stuff, so I only use the query-method directly on the pool object.

Will add this asap.