aboutsummaryrefslogtreecommitdiff
path: root/ext/wasm/api/sqlite3-api-prologue.js
diff options
context:
space:
mode:
authorstephan <stephan@noemail.net>2022-12-23 21:23:26 +0000
committerstephan <stephan@noemail.net>2022-12-23 21:23:26 +0000
commitbb769f0b4a025761fa2f5150582cf7736cb14345 (patch)
tree23c7c0643f8a95efcbaf728af8b7bba0057c0cd5 /ext/wasm/api/sqlite3-api-prologue.js
parent77eac0507c7f36a50814336fb1da6a5c3923ffec (diff)
parentab9c2d571e5927060c65d7bfd3132348f6240159 (diff)
downloadsqlite-bb769f0b4a025761fa2f5150582cf7736cb14345.tar.gz
sqlite-bb769f0b4a025761fa2f5150582cf7736cb14345.zip
Merge trunk into wasm-session-api branch.
FossilOrigin-Name: 6cdb036d8e8c5ddb0c6578aeefe318e74d7a90228e57b9f9047057dae3252963
Diffstat (limited to 'ext/wasm/api/sqlite3-api-prologue.js')
-rw-r--r--ext/wasm/api/sqlite3-api-prologue.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/ext/wasm/api/sqlite3-api-prologue.js b/ext/wasm/api/sqlite3-api-prologue.js
index 94514e477..6c50e99b0 100644
--- a/ext/wasm/api/sqlite3-api-prologue.js
+++ b/ext/wasm/api/sqlite3-api-prologue.js
@@ -425,7 +425,9 @@ self.sqlite3ApiBootstrap = function sqlite3ApiBootstrap(
any encoding other than sqlite3.SQLITE_UTF8. The JS API does not
currently support any other encoding and likely never
will. This function does not replace that argument on its own
- because it may contain other flags.
+ because it may contain other flags. As a special case, if
+ the bottom 4 bits of that argument are 0, SQLITE_UTF8 is
+ assumed.
2) Any of the four final arguments may be either WASM pointers
(assumed to be function pointers) or JS Functions. In the
@@ -433,6 +435,10 @@ self.sqlite3ApiBootstrap = function sqlite3ApiBootstrap(
sqlite3.capi.wasm.installFunction() and that wrapper is passed
on to the native implementation.
+ For consistency with the C API, it requires the same number of
+ arguments. It returns capi.SQLITE_MISUSE if passed any other
+ argument count.
+
The semantics of JS functions are:
xFunc: is passed `(pCtx, ...values)`. Its return value becomes