We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e16ae3c commit 1ee5a18Copy full SHA for 1ee5a18
coffee/api.coffee
@@ -374,8 +374,13 @@ class Database
374
### Exports the contents of the database to a binary array
375
@return [Uint8Array] An array of bytes of the SQLite3 database file
376
###
377
- 'export': -> FS.readFile @filename, encoding:'binary'
378
-
+ 'export': ->
+ stmt['free']() for _,stmt of @statements
379
+ @handleError sqlite3_close_v2 @db
380
+ binaryDb = FS.readFile @filename, encoding:'binary'
381
+ @handleError sqlite3_open @filename, apiTemp
382
+ @db = getValue apiTemp, 'i32'
383
+ binaryDb
384
385
### Close the database, and all associated prepared statements.
386
0 commit comments