1 | # any-db-mysql
|
2 |
|
3 | [![Build Status](https://secure.travis-ci.org/grncdr/node-any-db-mysql.png)](http://travis-ci.org/grncdr/node-any-db-mysql)
|
4 |
|
5 | This is the MySQL adapter for Any-DB. It relies on the [mysql][mysql]
|
6 | database driver to create connection and query objects that conform to the
|
7 | [Any-DB API](https://github.com/grncdr/node-any-db-adapter-spec). It's almost
|
8 | identical to `require('mysql')` but lets your app code be somewhat more
|
9 | database agnostic.
|
10 |
|
11 | ## API extensions
|
12 |
|
13 | The connections and queries this package creates inherit from the constructor
|
14 | functions in `require('mysql')`, so any methods that `mysql` supports beyond
|
15 | those [specified by Any-DB][Connection] are also available to you.
|
16 |
|
17 | Keep in mind that these methods will *not* necessarily work with other backends.
|
18 |
|
19 | ## Install
|
20 |
|
21 | npm install any-db-mysql
|
22 |
|
23 | ## Running tests
|
24 |
|
25 | Create an empty test database:
|
26 |
|
27 | mysql -uroot -e 'CREATE DATABASE IF NOT EXISTS any_db_test'
|
28 |
|
29 | Then run tests the node way:
|
30 |
|
31 | npm install && npm test
|
32 |
|
33 | ## License
|
34 |
|
35 | MIT
|
36 |
|
37 | [Connection]: https://github.com/grncdr/node-any-db-adapter-spec#connection
|
38 | [mysql]: https://github.com/felixge/node-mysql
|