]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Add missing docs for the JS Worker1 export method, as pointed out in [forum:75524f734...
authorstephan <stephan@noemail.net>
Fri, 27 Oct 2023 23:02:01 +0000 (23:02 +0000)
committerstephan <stephan@noemail.net>
Fri, 27 Oct 2023 23:02:01 +0000 (23:02 +0000)
FossilOrigin-Name: a7b267bd11216ee990cdd855044fbc18c300dff07cf25b317f27c1bbbc340dcc

ext/wasm/api/sqlite3-api-worker1.js
manifest
manifest.uuid

index 29f7d2be6382ee327f8e5348c761ef4cfc000978..7c65dd1d3e8695061317d447d4dfb4cb054c9383 100644 (file)
@@ -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.
   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(){
index dbfd82067a73c861edaa257d36c1b4d4bd1b853e..9a4dde3eadf01811707306c404feaa5bd8704796 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Export\ssqlite3_get_autocommit()\sto\sWASM\sand\sadd\stests\sfor\sit.
-D 2023-10-27T21:05:50.750
+C Add\smissing\sdocs\sfor\sthe\sJS\sWorker1\sexport\smethod,\sas\spointed\sout\sin\s[forum:75524f7342|forum\spost\s75524f7342].
+D 2023-10-27T23:02:01.291
 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
 F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
@@ -583,7 +583,7 @@ F ext/wasm/api/sqlite3-api-cleanup.js d235ad237df6954145404305040991c72ef8b18817
 F ext/wasm/api/sqlite3-api-glue.js 119b91c8a7ce6648679eb66fcdd1ed07ef7fd892eb501d658fbfefcc962012d9
 F ext/wasm/api/sqlite3-api-oo1.js 9678dc4d9a5d39632b6ffe6ea94a023119260815bf32f265bf5f6c36c9516db8
 F ext/wasm/api/sqlite3-api-prologue.js 9aeba7b45cf41b3a26d34d7fb2525633cd1adfc544888c1ea8dbb077496f4ce9
-F ext/wasm/api/sqlite3-api-worker1.js f941382f21006b4a817754184e2661b0a63ce650201f3419cd60f4758b6fd60e
+F ext/wasm/api/sqlite3-api-worker1.js 88770ac01fc756f89a3e060eec17111d6c1688e89ebfd34cb9d9e54d25affbb9
 F ext/wasm/api/sqlite3-license-version-header.js 0c807a421f0187e778dc1078f10d2994b915123c1223fe752b60afdcd1263f89
 F ext/wasm/api/sqlite3-opfs-async-proxy.js 8cf8a897726f14071fae6be6648125162b256dfb4f96555b865dbb7a6b65e379
 F ext/wasm/api/sqlite3-v-helper.js 7daa0eab0a513a25b05e9abae7b5beaaa39209b3ed12f86aeae9ef8d2719ed25
@@ -2137,8 +2137,8 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
 F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
 F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
-P ac920b5386db525c794f4cae332dedcc709cac356f6fb85f3e92bc0a34602511
-R 7ff5dd75150e8cac0c211f64ca609fc2
+P 7cb6d3cd3926882240c91a4b90fdf237b931653295d8d94b05ed885dcae59608
+R 53009930e6bc65b4da12fb26b9e7e080
 U stephan
-Z 90696a3c18b398d4eb36aae7078d8581
+Z 6e447e009637f07735108793303337a5
 # Remove this line to create a well-formed Fossil manifest.
index 4cd797eb126a8e99231b85bcf204bfe300fd326b..cddb3f9f7dc344a2e488f1f57e23e912e3a1a1a9 100644 (file)
@@ -1 +1 @@
-7cb6d3cd3926882240c91a4b90fdf237b931653295d8d94b05ed885dcae59608
\ No newline at end of file
+a7b267bd11216ee990cdd855044fbc18c300dff07cf25b317f27c1bbbc340dcc
\ No newline at end of file