Skip to content

Commit df8e361

Browse files
committed
Add mysql2 to the drivers list
1 parent f172c8e commit df8e361

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
> Wrapper for multiple databases with a JDBC-like connection
99
10-
Database-js implements a common, promise-based interface for SQL database access. Inspired by Java, it uses connection strings to identify the database driver. Wrappers around native database drivers provide a unified interface to handle databases. Thus, you don't need to modify your code (except the connection string) to change your database! 😉
10+
Database-js implements a common, promise-based interface for SQL database access. Inspired by JDBC, it uses connection strings to identify the database driver. Wrappers around native database drivers provide a unified interface to handle databases. Thus, you can change the target database by modifying the connection string. 😉
1111

1212
Database-js has built-in prepared statements, even if the underlying driver does not support them. It is built on Promises, so it works well with ES7 async code.
1313

@@ -36,7 +36,8 @@ npm install database-js
3636
| [Firebase](//github.com/mlaanderson/database-js-firebase) | | `npm i database-js-firebase` |
3737
| [INI files](//github.com/mlaanderson/database-js-ini) | | `npm i database-js-ini` |
3838
| [JSON files](//github.com/thiagodp/database-js-json) | | `npm i database-js-json` |
39-
| [MySQL](//github.com/mlaanderson/database-js-mysql) | | `npm i database-js-mysql` |
39+
| [MySQL](//github.com/mlaanderson/database-js-mysql) | prior to MySQL v8 | `npm i database-js-mysql` |
40+
| [MySQL2](//github.com/esteban-serfe/database-js-mysql2/) | MySQL v8+ | `npm i database-js-mysql2` |
4041
| [MS SQL Server](https://github.com/thiagodp/database-js-mssql) | | `npm i database-js-mssql` |
4142
| [PostgreSQL](//github.com/mlaanderson/database-js-postgres) | | `npm i database-js-postgres` |
4243
| [SQLite](//github.com/mlaanderson/database-js-sqlite) | | `npm i database-js-sqlite` |
@@ -45,6 +46,8 @@ npm install database-js
4546

4647
## Usage
4748

49+
Usage _without_ async/await:
50+
4851
```javascript
4952
var Connection = require('database-js').Connection;
5053

@@ -84,7 +87,8 @@ conn.close()
8487

8588
### Async / await
8689

87-
Because **database-js** is built on Promises, it works very well with [async/await](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/async_function). Compare the following code to the code from above. They accomplish the same thing.
90+
Using async/await:
91+
8892
```javascript
8993
const Connection = require('database-js').Connection;
9094

@@ -120,8 +124,6 @@ const Connection = require('database-js').Connection;
120124

121125
## Basic API
122126

123-
See the source code for the full API.
124-
125127
```ts
126128
class Connection {
127129

0 commit comments

Comments
 (0)