aboutsummaryrefslogtreecommitdiff
path: root/ext/wasm/api
Commit message (Collapse)AuthorAge
...
* Extend wasm build to support a custom sqlite3.c to support building against ↵stephan2023-03-08
| | | | | sqlite3-see.c. The JS code now binds the SEE-specific functions if it detects an SEE build. FossilOrigin-Name: dd8612c8adbaf9d06bf0d7319b9afc9bd8ca3d0fcfa1cb591a7a2fcb86480048
* Improve how sqlite3.initWorker1API() determines whether it's running in a ↵stephan2023-03-07
| | | | | Worker thread. Based on feedback in [forum:ac7a94d4f77db235|forum post ac7a94d4f77db235]. FossilOrigin-Name: 2f712b836a0dafd0b2ee6ba4eaa9caa35e49375c7ad0562477e0f2d3b086ec03
* Replace use of 'self' in JS code with 'globalThis', as that works in ↵stephan2023-03-07
| | | | | browsers and node environments. Avoid using globalThis.location if it's not set (e.g. in node). Based on feedback in [forum:ac7a94d4f77db235|forum post ac7a94d4f77db235]. Minor JS build tweaks. FossilOrigin-Name: dbbe8f25e58738c10b6192d41f1e3886983871f17631cbc45ce626d3f05a6e26
* In the JS sqlite3.vfs/vtab utility APIs, use a local reference to ↵stephan2023-03-07
| | | | | StructBinder instead of sqlite3.StructBinder, as that object is removed from the sqlite3 namespace during the final steps of API initialization. Based on feedback from [forum:d19d96183badca70|forum post d19d96183badca70]. FossilOrigin-Name: 0d89885d28b44b1858117a72a180841f4f5f44bcc574fc59a116ca3526325932
* Rename sqlite3-worker1-bundler-friendly.js to ↵stephan2023-03-05
| | | | | sqlite3-worker1-bundler-friendly.mjs and refactor it to work as an ES6 module, based on feedback in [forum post a255f89c2eadf4c4|forum:a255f89c2eadf4c4]. FossilOrigin-Name: af312b131457743d98b84137bd51d9ba60e0daf0bd8f5a66f05956ca35ab68fb
* Extend wasm build to enable inclusion of client-custom C code, initialized ↵stephan2023-02-27
| | | | | via the SQLITE_EXTRA_INIT mechanism, per discussion in [forum:1e1c04f3ed1bc96b|forum post 1e1c04f3ed1bc96b]. FossilOrigin-Name: 68a52cafff60f19c9c998133d04f192b1e8b23f78b8cee13807d76845ef5e13d
* Remove some unnecessary bind() calls in JS code.stephan2023-02-21
| | | FossilOrigin-Name: 71215599cd8ebb970500d8366dfac40420a9a6b243ea9d6ba62d5cde28fae3d3
* Minor text-only updates to wasm demo/test HTML and license header.stephan2023-02-10
| | | FossilOrigin-Name: f28e2a8613571fe3c23bfbbb602311071f4cb9731653216cfe436c38b0a59736
* Roll back part of [c54f29d8] which attempted to use symbols which that ↵stephan2023-02-06
| | | | | worker does not have access to. FossilOrigin-Name: 90b12211376eb445df7221b3d3593394ff651ef93f4218492c6208bc74b8fc63
* Add capability to override the JS's use of console.log/debug/warn/error() ↵stephan2023-02-06
| | | | | with client-provided versions via the bootstrap-time config object. FossilOrigin-Name: c54f29d8e55419eaa9168e799dab5030e89063b13d8390a50616606422d164dc
* Remove automatic installation of JS-global S object for the sake of client ↵stephan2023-02-02
| | | | | libraries which embed this library, per [forum:9d4f722c6912799d|request in the forum]. FossilOrigin-Name: 9504f68af8360ea6d61574fd4b9811af34b721c12d9653eb50adcf0f12b129fc
* Two JS file renames which got inadvertently undone while setting up ↵stephan2023-01-29
| | | | | [9062b31174618c0e]. Cosmetic cleanups in ext/wasm/dist.make. FossilOrigin-Name: 0c2fde767f77d6204e95737edd573f42d72e956a3c20ea7e4daeff906657bbe5
* Enhance oo1.DB.exec() to simplify returning whole result sets.stephan2023-01-28
| | | FossilOrigin-Name: 7b168ee2af09f04b41a6ef4c14ccaddc0c9b0bfe9dc1e6a86d8f5317606bd78d
* Add JS bundler-friendly JS build. Minor test code cleanups.stephan2023-01-28
|\ | | | | FossilOrigin-Name: 24d3a53dea5e596230558e233cbbd9d0288b4c394cd5ea7b650fd99bff4cde2e
| * Add a feature idea note to DB.exec(), derived from a forum discussion.stephan2023-01-27
| | | | | | FossilOrigin-Name: 792f43209c4b6e85386b6b3906814b7f2ad310d50ba563b3fd1cb37e55adf8db
| * Work around upstream emscripten 3.1.31 bug ↵stephan2023-01-27
| | | | | | | | | | [https://github.com/emscripten-core/emscripten/issues/18609]. FossilOrigin-Name: fa784101775b795077a23c211b5b16f51ad5a13967c284511f310dfcbfa9f77a
| * More work on creating a separate sqlite3.js build which is hopefully ↵stephan2023-01-27
| | | | | | | | | | friendly to JS bundlers. FossilOrigin-Name: b7b896fb448a7f46eb88eadadb1359255aec637a384cabcdd526276a02f4f0b4
| * Resolve a nested if-block bug in ext/wasm/c-pp.c which caused output after a ↵stephan2023-01-27
| | | | | | | | | | nested block to be unduly elided. Remove a kludge, added in the previous check-in, which worked around that bug. FossilOrigin-Name: 7a026a4b24d57c1b0970923b972dd42c3f1bb5b282f908079075468b2e1bf601
| * Beginnings of a bundler-friendly build of sqlite3.mjs. Not yet ready for ↵stephan2023-01-27
| | | | | | | | | | downstream testing. FossilOrigin-Name: 4271bf5f41df091696f1dcfc4ffe7a60d24066fc75c896941e0b56de95fe5f89
* | Work around a JS null pointer deref which could be triggered from the dev ↵stephan2023-01-27
| | | | | | | | | | console, but not (it seems) from client-side code. FossilOrigin-Name: eabb551b8b3d33fc3a327ecf7225436a3a3f616901e22c868fd76a5e3adc7b3f
* | Cherrypick [fa784101775b7|emscripten ticket #18609 workaround] into trunk.stephan2023-01-27
|/ | | FossilOrigin-Name: 9a26fae545b9c97129893b83ff97e62b1c477eccd1379af1dce4a3cc4fa9f932
* End-of-line whitespace cleanups and doc typo fixes. No code changes.stephan2023-01-26
| | | FossilOrigin-Name: bdfd72a083fadd724030c4c89adae71426e1ddd402c6bc5abf40801ecf3253cf
* Minor API doc cleanups and JS code simplification.stephan2023-01-21
| | | FossilOrigin-Name: f608a3a45609693c1c0237f12c394275ec9a6225fa986e62345f21af763293a0
* Remove the JS-side SQLITE_WASM_DEALLOC sanity check which triggers the ↵stephan2023-01-04
| | | | | problem mentioned in [688c5c13d156] and [ae0196d86ee8], for reasons covered in the code comments, per discussion in [forum:e5b20e1feb|forum post e5b20e1feb]. FossilOrigin-Name: 65ff3200c6009a1649fc108d7ce36f5c014185ba46bbf98471ec86eaeb572656
* Add some docs explaining a particular piece of [ae0196d86ee8]. No code changes.stephan2023-01-02
| | | FossilOrigin-Name: 7f96803c1cbd0633367173ab0a67a8b301b9e0746e460c50d506b536c15db0a0
* Another reformulation of SQLITE_WASM_DEALLOC to attempt to work around a ↵stephan2023-01-02
| | | | | Safari-specific quirk reported in [forum:5489305f601b8c3f|forum post 5489305f601b8c3f]. FossilOrigin-Name: ae0196d86ee8ca424b5ef5a43c32988f4ab5131ea146669bc1467e31a2384901
* An alternative solution to mapping SQLITE_WASM_DEALLOC to the proper ↵stephan2023-01-01
| | | | | function pointer in JS, to account for a Safari-specific quirk reported in [forum:e5b20e1feb|forum post e5b20e1feb]. FossilOrigin-Name: 688c5c13d156f987b895df1d5a5b770616b0d9caec4726e03ba122eb8539e7b2
* Add sqlite3changeset_new/old_js(), which work like ↵stephan2022-12-27
| | | | | sqlite3_preupdate_new/old_js() but on changesets. FossilOrigin-Name: e8afad630b085a9208491e0516a6a30c9cda77a20b1aa2cba49b2f44eb9fa2f8
* Expose sqlite3_preupdate_hook() and friends to the JS API.stephan2022-12-27
| | | FossilOrigin-Name: cc02783a1210a083683320fae1ec1519e45b8e3003a9e32809d808513a2ce06b
* Expose sqlite3_commit/rollback/update_hook() to JS API.stephan2022-12-27
| | | FossilOrigin-Name: f99f8e3ecfe205337996ee61c0b9f139d3e8788b14f32e26560888b3a16564de
* Add an optional argument to oo1.DB.transaction() to specify an explicit ↵stephan2022-12-27
| | | | | BEGIN qualifier. FossilOrigin-Name: 507335c12b1dbe21d180cf6f0a0deb4cc737417acb44c8f1d8fac98b86f62b01
* Expose the auto-extension API to JS and reorganize some nearby code.stephan2022-12-26
| | | FossilOrigin-Name: 52b229d11d82bfb81c8b63e252c51c57a34dc50498dd685451588c185873c628
* Document sqlite3.capi.sqlite3_prepare_v3() as accepting an ArrayBuffer and ↵stephan2022-12-26
| | | | | ensure that it can. FossilOrigin-Name: ae3ae92ec45d3d5de92e70876502f8108fc3fcd87848e86c2b83f8842f1ff139
* Correct some internal-use JS docs and update the 'string:flexible' type ↵stephan2022-12-26
| | | | | conversion to accept an ArrayBuffer (as it was recently documented to). FossilOrigin-Name: eff5d3bec29043cc1182bbb5229040dac5ff50264d025e354736bb63b4bc97a0
* Only add an on-db-close cleanup entry for collations if adding the collation ↵stephan2022-12-26
| | | | | succeeds and xCompare is-a JS function. FossilOrigin-Name: 18a5480f1e0dca55703b43fa17685a4cc577cab8841ce47c807af02348ad85ee
* Extend [0e69b2c379e618] to support uninstalling stale JS-to-WASM function ↵stephan2022-12-26
| | | | | pointers added on behalf of UDFs. FossilOrigin-Name: 7a46e629dcbf97ae037c5abb39306af7ad55f1910c1e962373e09d88d8bd5a33
* Add JS infrastructure which enables sqlite3.capi.sqlite3_close_v2() to clean ↵stephan2022-12-26
| | | | | up stale JS-to-WASM collation function conversions installed on behalf of a given db handle. The same for UDF mappings is TODO. FossilOrigin-Name: 0e69b2c379e61893c7db8a9c9d270650f2bd63b6cea30811d41136392a2e4f04
* Reimplement sqlite3.capi.sqlite3_close_v2() and sqlite3session_delete() as a ↵stephan2022-12-26
| | | | | hand-written bindings so that they can attempt to clean up certain (potentially) FuncPtrAdapter-installed functions before closing. Correct the create-function family of JS-to-function-pointer automated conversions to include the UDF's arity as part of the mapping's key so that (un)binding a UDF to different functions for different arities works (and add tests confirming it). Correct a broken doc link in module-symbols.html. FossilOrigin-Name: 60b262ef0f57b162c2566b12e70685a92afb00b441332ea7a6540fcb188cc7af
* Update JS worker #1 API and related tests for recent API changes.stephan2022-12-25
| | | FossilOrigin-Name: d797e183e96e04520636865204c02307b751fdc2949a04587de9259a1733e37b
* Rename the new wasm.irSizeof() to sizeofIR() because that seems clearer.stephan2022-12-25
| | | FossilOrigin-Name: 49a83ca3ba46d3ae8021fbdd72b48ce9181eea6845fa7bb7aa83b16fad1728be
* Minor internal API doc correction and extend a test for oo1.DB.selectValues().stephan2022-12-25
| | | FossilOrigin-Name: b7295b1ca700945ae4e89be69f954dce9960e8975664e620898392b2cc78d452
* Add sqlite3.oo1.DB.selectValues(). Correct a logic error which could cause ↵stephan2022-12-25
| | | | | DB.selectValue(), DB.selectArray(), and DB.selectObject() to fail to finalize a statement if a call to bind() failed. Add more session API tests. FossilOrigin-Name: 6adc8a10146190037d55d3328d2f78aa5233559f88d4aa70fbbf9e10145b9b6c
* Merge wasm-session-api branch into trunk, adding the session API to the ↵stephan2022-12-25
|\ | | | | | | | | JS/WASM components. FossilOrigin-Name: dfb8b651fa4faef2d3307a05512cdc479398484c3a59715827179c363861a777
| * Add sqlite3.wasm.irSizeof() and extend certain allocation functions to make ↵stephan2022-12-25
| | | | | | | | | | use of it. FossilOrigin-Name: 1cbc7b1875e8611b9db7a747b4c9499501450deaf90c929d212511837d6f72b6
| * Remove duplicated JS binding of sqlite3changeset_apply_v2().stephan2022-12-25
| | | | | | FossilOrigin-Name: 2e8336b6e1cba89dbcc11d6316e39c929bf8b018a18b92efc232abd47e0a5cc6
| * Add the address of the associated db handle to the sqlite3_trace_v2() output ↵stephan2022-12-25
| | | | | | | | | | originating from sqlite3.oo1.DB's trace flag. FossilOrigin-Name: 0a36568c5a3db56a8ad23fd8abc672c5a7f1abed55984d902842ffd3ebb816e8
| * Update the session-related JS bindings to account for today's internal API ↵stephan2022-12-25
| | | | | | | | | | changes. FossilOrigin-Name: be63944d4114f53f2dab65bc6c1b85f4766a4ea14ee7b2690acde239a2a0bf54
| * Merge trunk into wasm-session-api branch.stephan2022-12-25
| |\ | | | | | | FossilOrigin-Name: 7f8f1acd82be7dc2eb2147d96299b1b443e86774dfe0b0a8d32669a0500fc9c6
| * \ Merge trunk into wasm-session-api branch.stephan2022-12-23
| |\ \ | | | | | | | | FossilOrigin-Name: 6cdb036d8e8c5ddb0c6578aeefe318e74d7a90228e57b9f9047057dae3252963
| * \ \ Merge trunk into wasm-session-api branch.stephan2022-12-23
| |\ \ \ | | | | | | | | | | FossilOrigin-Name: f1decc831fe0dc8523956e74474d9663852b0e5b56240dd8504952726e713a97