Skip to content

Commit 8d1f51d

Browse files
committed
Docs
1 parent 61eacb6 commit 8d1f51d

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

docs/docs/api.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,9 @@ SQLite has a limit for attached databases: A default of 10, and a global max of
188188
SQLite docs for [Attach](https://www.sqlite.org/lang_attach.html) - [Detach](https://www.sqlite.org/lang_detach.html)
189189

190190
```tsx
191+
// Follows similar API to the `open` call
191192
db.attach({
192-
secondaryDbFileName: 'statistics.sqlite', // Just the filename of the database
193+
secondaryDbFileName: 'statistics.sqlite', // Filename of the database (JUST THE FILENAME)
193194
alias: 'stats', // Alias to be applied to the db
194195
location: '../databases', // Path to be prepended to secondaryFileName, in this case full db path: ../databases/statistics.sqlite
195196
});
@@ -200,10 +201,6 @@ const res = await db.execute(
200201

201202
// You can detach databases at any moment
202203
db.detach('stats');
203-
204-
if (!detachResult.status) {
205-
// Database de-attached
206-
}
207204
```
208205

209206
## Loading SQL Dump Files

0 commit comments

Comments
 (0)