Skip to content

Commit

Permalink
Updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ravenjohn committed Feb 15, 2017
1 parent 2c5c17b commit 6894850
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,18 @@ mysql.query(
.end();
```

### Doing a single query using promise
After registering a db key and config, you can now start querying.
```javascript
mysql.build(
'SELECT name FROM users WHERE name = ?',
['name']
)
.promise()
.then()
.catch();
```

**Note:** Single connections will only be created on `mysql.query(...)` while pooled connections will be created on `mysql.use('db1', config.DB, true)`.

### Doing multiple queries using 1 connection
Expand Down

0 comments on commit 6894850

Please sign in to comment.