diff options
author | stephan <stephan@noemail.net> | 2023-11-02 18:08:49 +0000 |
---|---|---|
committer | stephan <stephan@noemail.net> | 2023-11-02 18:08:49 +0000 |
commit | 06af40b2e1730669342122db14eab2e83588e1d5 (patch) | |
tree | 9ca33ae84feda58fa1711682e8f811d655c8db70 /ext/wasm/api/sqlite3-api-worker1.js | |
parent | 845a2e0cc246a80c99509e7319f2d506ce0528fa (diff) | |
parent | 7d522628896b4bcf6d077bd9088b0d19d4e55bda (diff) | |
download | sqlite-06af40b2e1730669342122db14eab2e83588e1d5.tar.gz sqlite-06af40b2e1730669342122db14eab2e83588e1d5.zip |
Merge latest JNI pieces into trunk.
FossilOrigin-Name: e8c97faec339430fa2d1a7e915050d9b363bdba606a4419397cb099141da254d
Diffstat (limited to 'ext/wasm/api/sqlite3-api-worker1.js')
-rw-r--r-- | ext/wasm/api/sqlite3-api-worker1.js | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/ext/wasm/api/sqlite3-api-worker1.js b/ext/wasm/api/sqlite3-api-worker1.js index 29f7d2be6..7c65dd1d3 100644 --- a/ext/wasm/api/sqlite3-api-worker1.js +++ b/ext/wasm/api/sqlite3-api-worker1.js @@ -62,7 +62,7 @@ ``` { - type: string, // one of: 'open', 'close', 'exec', 'config-get' + type: string, // one of: 'open', 'close', 'exec', 'export', 'config-get' messageId: OPTIONAL arbitrary value. The worker will copy it as-is into response messages to assist in client-side dispatching. @@ -325,6 +325,37 @@ passed only a string), noting that options.resultRows and options.columnNames may be populated by the call to db.exec(). + + ==================================================================== + "export" the current db + + To export the underlying database as a byte array... + + Message format: + + ``` + { + type: "export", + messageId: ...as above..., + dbId: ...as above... + } + ``` + + Response: + + ``` + { + type: "export", + messageId: ...as above..., + dbId: ...as above... + result: { + byteArray: Uint8Array (as per sqlite3_js_db_export()), + filename: the db filename, + mimetype: "application/x-sqlite3" + } + } + ``` + */ globalThis.sqlite3ApiBootstrap.initializers.push(function(sqlite3){ sqlite3.initWorker1API = function(){ |