File tree Expand file tree Collapse file tree 2 files changed +30
-0
lines changed
Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,8 @@ before using this wrapper library.
3030 * The ` README.md ` file explains how to do this.
3131- Opening a new database has changed. See ` README.md ` for example.
3232- migrations API: ` force ` is now a ` boolean ` .
33+ - Can no longer specify a custom ` Promise ` library. Uses native ` Promise ` instead.
34+
3335
3436### [ v3.0.3]
3537> 2019-03-22
Original file line number Diff line number Diff line change @@ -162,6 +162,34 @@ import { open } from 'sqlite'
162162})()
163163```
164164
165+ #### Opening multiple databases
166+
167+ ``` typescript
168+ import sqlite3 from ' sqlite3'
169+ import { open } from ' sqlite'
170+
171+ (async () => {
172+ const [db1, db2] = await Promise .all ([
173+ open ({
174+ filename: ' /tmp/database.db' ,
175+ driver: sqlite3 .Database
176+ }),
177+ open ({
178+ filename: ' /tmp/database2.db' ,
179+ driver: sqlite3 .Database
180+ }),
181+ ])
182+
183+ await db1 .migrate ({
184+ migrationsPath: ' ...'
185+ })
186+
187+ await db2 .migrate ({
188+ migrationsPath: ' ...'
189+ })
190+ })()
191+ ```
192+
165193#### ` open ` config params
166194
167195``` typescript
You can’t perform that action at this time.
0 commit comments