Skip to content

Commit 1d74add

Browse files
committed
Update readme
1 parent 7285bdb commit 1d74add

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@
2020
- [Without caching](#without-caching)
2121
- [With caching](#with-caching)
2222
- [Enable verbose / debug mode](#enable-verbose--debug-mode)
23+
- [Tracing SQL errors](#tracing-sql-errors)
2324
- [With a custom driver](#with-a-custom-driver)
25+
- [Opening multiple databases](#opening-multiple-databases)
2426
- [`open` config params](#open-config-params)
2527
- [Examples](#examples)
2628
- [Creating a table and inserting data](#creating-a-table-and-inserting-data)
@@ -144,6 +146,16 @@ import sqlite3 from 'sqlite3'
144146
sqlite3.verbose()
145147
```
146148

149+
#### Tracing SQL errors
150+
151+
For more info, see this [doc](https://github.com/mapbox/node-sqlite3/wiki/Debugging#databaseontrace-callback).
152+
153+
```typescript
154+
db.on('trace', (data) => {
155+
156+
})
157+
```
158+
147159
#### With a custom driver
148160

149161
You can use an alternative library to `sqlite3` as long as it conforms to the `sqlite3` [API](https://github.com/mapbox/node-sqlite3/wiki/API).

0 commit comments

Comments
 (0)