UNPKG

1.14 kBMarkdownView Raw
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
5This is the MySQL adapter for Any-DB. It relies on the [mysql][mysql]
6database 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
8identical to `require('mysql')` but lets your app code be somewhat more
9database agnostic.
10
11## API extensions
12
13The connections and queries this package creates inherit from the constructor
14functions in `require('mysql')`, so any methods that `mysql` supports beyond
15those [specified by Any-DB][Connection] are also available to you.
16
17Keep 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
25Create an empty test database:
26
27 mysql -uroot -e 'CREATE DATABASE IF NOT EXISTS any_db_test'
28
29Then run tests the node way:
30
31 npm install && npm test
32
33## License
34
35MIT
36
37[Connection]: https://github.com/grncdr/node-any-db-adapter-spec#connection
38[mysql]: https://github.com/felixge/node-mysql