any-db-mysql
Version:
The MySQL adapter for any-db
39 lines (23 loc) • 1.14 kB
Markdown
[](http://travis-ci.org/grncdr/node-any-db-mysql)
This is the MySQL adapter for Any-DB. It relies on the [mysql][mysql]
database driver to create connection and query objects that conform to the
[](https://github.com/grncdr/node-any-db-adapter-spec). It's almost
identical to `require('mysql')` but lets your app code be somewhat more
database agnostic.
The connections and queries this package creates inherit from the constructor
functions in `require('mysql')`, so any methods that `mysql` supports beyond
those [specified by Any-DB][connection] are also available to you.
Keep in mind that these methods will _not_ necessarily work with other backends.
npm install any-db-mysql
Create an empty test database:
mysql -uroot -e 'CREATE DATABASE IF NOT EXISTS any_db_test'
Then run tests the node way:
npm install && npm test
MIT
[]: https://github.com/grncdr/node-any-db-adapter-spec#connection
[]: https://github.com/felixge/node-mysql