aboutsummaryrefslogtreecommitdiff
path: root/ext/wasm/api/sqlite3-api-prologue.js
Commit message (Collapse)AuthorAge
...
* Make semantics for UDF xFinal() result handling and error reporting handling ↵stephan2022-10-20
| | | | | more flexible. FossilOrigin-Name: 89f3e1982ec32c010af67d15ef780847df20de568669e5c9d02f3cf084f51330
* Add more JS tests. Flesh out the aggregate UDF tests to use ↵stephan2022-10-20
| | | | | sqlite3_aggregate_context() so that they can each be used multiple times in the same statement. Add sqlite3_js_aggregate_context() convenience helper. FossilOrigin-Name: 9d034ef5e1bab7c9651c2450dc85765fa6365d3f1414c711550de858ff8b3ece
* Rename sqlite3_web_... to sqlite3_js_... Document the worker1.close.unlink ↵stephan2022-10-20
| | | | | option. Fix unlink usage in speedtest1.html. Minor JS build cleanups. FossilOrigin-Name: ac9af71b72a749b0a040273a88480d56f49570b569389a4ea20cc055f494d8ff
* Rework sqlite3_wasm_vfs_unlink(), add sqlite3_wasm_db_vfs(), update some docs.stephan2022-10-20
| | | FossilOrigin-Name: cdd46858f0e63bc7bfce8e339b3db9efdec43b6443ee76563a847f53d0176831
* Minor internal JS cleanups.stephan2022-10-20
| | | FossilOrigin-Name: 818ef0b5c909e733b643455278f7cc45533178f1cc6617058c00ed64fa44896a
* Apply considerable acrobatics to get the JS/WASM deliverables building to ↵stephan2022-10-19
| | | | | and loadable from a directory other than the one which contains the app-level code. Requires an only-slightly-leaky abstraction of passing a URL argument when loading sqlite3.js but provides much greater flexibility in where the JS/WASM files are located. FossilOrigin-Name: 6d468dab9eb84d4548f68014959f02fe4f66455472ff24fe729382bb2972e3d1
* Considerable wasm/js build cleanups and reworking. Remove wasmfs builds from ↵stephan2022-10-19
| | | | | the end-user deliverables and disable the wasmfs build by default, per /chat discussion, as it doubles our deliverable count for only marginal gain. Attempt to move the sqlite3.js/wasm files into subdirectories but rediscovered that that breaks loading in Worker mode because URI resolution of the wasm files differs depending on whether the main script is loaded from a script tag or a Worker. FossilOrigin-Name: 5b23e0675efdd2f1ea7b4f5836a579e8d6aa8a25b3f1a6a950520ad845ff01bb
* JS: add build-time-generated version info to the sqlite3.version object. ↵stephan2022-10-16
| | | | | Remove some stray debug output from tester1.js. FossilOrigin-Name: b5f462c2d85d503f6492ec20580d57cb4c926712f6306a6be764bd09d1f5e8b8
* Move the rest of testing1.js into tester1.js and eliminate the dependency on ↵stephan2022-10-13
| | | | | jaccwabyt_test.c. Extend the list of default config-related #defines in sqlite3-wasm.c and reorganize them for maintainability. FossilOrigin-Name: 4e2a8aff2dd4b6e148f45184e2523ebe47815257eca97fa3d32bcbf9625f0def
* Port the first 180-odd unit tests from testing1.* into the new tester1.*. ↵stephan2022-10-13
| | | | | Fix a stray-keystroke-induced typo which broke pstack.allocChunks(). FossilOrigin-Name: ef689e33e464829f5cbe4ca24a53d9dba59abe74d3d80a37a91b93a4eccccf2d
* Minor cleaups in the post-init async phase of sqlite3 module initialization.stephan2022-10-09
| | | FossilOrigin-Name: 2e024a6b533524b7732cea8aa27b16363e17b4c32731ddf31085e91fc728c1af
* Refactor kvvfs JS bits to make use of [ea370b9b05f7ed7eaa]. At main-thread ↵stephan2022-10-09
| | | | | startup, if kvvfs is available, replace the kvvfs I/O methods with JS impls. Checkin part 2 of 2, to account for cherrypicking [ea370b9b05f7ed7eaa] into the kv-vfs branch. FossilOrigin-Name: a9047e020a097b2259bc9935b63ca1c538a3a7f1d050e15f0d0a08cfb84acc7c
* Replace time-based auto-unlock of opfs sync handles with lock ↵stephan2022-10-04
| | | | | acquisition/release via sqlite3_io_methods::xLock/xUnlock(). FossilOrigin-Name: 2625b7cfe1640c1d7e779ec1f37db970541598c0dc3e22e5eecf3c772d95ad40
* Minor pstack doc update.stephan2022-10-04
| | | FossilOrigin-Name: 6b4fb7c4e399ecc948ad41f5fa3139a9293cc822cd7efa2b83dc5fb1660b3ec6
* Minor cleanups and additions in sqlite3.capi.wasm.pstack.stephan2022-10-04
| | | FossilOrigin-Name: 97bd670d3859bd3f2e62c15065b238b85ef614f26479e56a14be42c5784aedf4
* Minor JS doc updates and typo fixes.stephan2022-10-03
| | | FossilOrigin-Name: 3cfcc14dfd220536141aeffb902fdc8db1cea055b2a0609b88e092fc3df94688
* Export sqlite3_trace_v2() to wasm and use it to ensure that the new per-VFS ↵stephan2022-10-03
| | | | | post-open SQL support in the DB ctor works. Default opfs vfs to journal_mode=truncate, as it's faster in that mode. Add 't' DB open-mode flag to enable SQL tracing to console.log(). FossilOrigin-Name: 508f7f6d63e52f61fae5abe817579a4e130fa7fbd18733d741d521a5bdabb7ce
* Minor JS API tweaks prompted by documenting them.stephan2022-10-03
| | | FossilOrigin-Name: a82e6faaa642b09d241232c4daa67134d4dfa24bf3ca3725740346ca5269b381
* More cleanups in the UDF argument and result handling, in particular int64. ↵stephan2022-10-02
| | | | | Consolidate some duplicate int64/bigint range checking code. Expose the UDF low-level utilities (arg/result conversion) to client code. Add the sqlite3_context pointer to the JS-side UDF wrappers for API consistency. FossilOrigin-Name: 10ab77af952abf09f93f342a9d07a3b133f2c4c0a3588df3390cd3a923cafae4
* JS: clean up create_function() wrapper and add support for ↵stephan2022-10-02
| | | | | create_window_function(). Eliminate an extraneous blob copy when a UDF returns a blob. Make use of newfound JS-fu to clean up how sqlite3ApiBootstrap() config is initialized. FossilOrigin-Name: d3bad9347c5423fa7f19ae729461636f1043c99a1f01f168efa10bebefb1cdd1
* js: implement a hand-written wrapper for sqlite3_create_function_v2() which ↵stephan2022-10-02
| | | | | converts, if necessary, JS-function-type args to WASM function wrappers. Replace DB.createFunction() impl with the new one. FossilOrigin-Name: 435ab33384017967e46f52b70bee851a85a28808990a0e58dd5288f606b89c9c
* More fleshing out of sqlite3.capi.wasm.pstack.stephan2022-10-02
| | | FossilOrigin-Name: eb5726677a727a958df11f1fba078d30c7c0ba2a9bdb158e8641b35b5f971af3
* General internal cleanups in the oo1 API.stephan2022-10-02
| | | FossilOrigin-Name: f9db664f756f3707afcb5dce87f6d946625848f27ea84337af68de72d4ad6c6b
* Correct fiddle db export breakage caused by a post-testing API change made ↵stephan2022-10-01
| | | | | in [1fa019c88dea]. FossilOrigin-Name: e73cc44ec36c7585ebb914bdeed5b39480fca7c7a8d3c4426bfe769c87b98d17
* wasm: correct a memleak caused by a shadowed var in the previous checkin. ↵stephan2022-10-01
| | | | | Add a stack-like allocator, sqlite3.capi.wasm.pstack, as a faster way of managing short-lived pointers (like the one which got shadowed). FossilOrigin-Name: 1fa019c88deac6b6e5155b620bdab1d7145846290daafb9adbefcf4f0fe542cf
* Fiddle: fix makefile dependency issue and duplicate inclusion of post-js.js. ↵stephan2022-10-01
| | | | | Reimplement db export using sqlite3_serialize(). FossilOrigin-Name: 29db7de79232c21d19b91bb0fc253114e02e21dd9bf90619453dbe72a4c8bf7f
* Note two wasm-related potential TODOs.stephan2022-10-01
| | | FossilOrigin-Name: 5636e82864457d870754ee7125c307dc5d2195197a5c0266579da9f102938b89
* Add JS wrapper for sqlite3_exec() which knows how to handle a JS callback. ↵stephan2022-09-30
| | | | | Add some console.error() reporting of module-load failures, as they otherwise often get silently swallowed up by the loader's mechanisms. Add 'flexible-string' JS-to-WASM argument converter which performs more X-to-string conversions than the 'string' arg converter does. FossilOrigin-Name: 96818aa83f4ccc574f558231249ecbdd39763b4351cf4cf6d33f53774a3ee5e6
* Add sqlite3.version object. Add more state to the Worker #1 config-get ↵stephan2022-09-30
| | | | | response, including sqlite3.version. FossilOrigin-Name: 711f458d188a0dbe6612069c856ade29323ab426dfa4f80e7b82757ccc474cb8
* Expose sqlite3_msize() to wasm.stephan2022-09-30
| | | FossilOrigin-Name: aa6ad34f3b693b554be58ee2895f79397162c5b8877c709653c8508fc625e8f4
* wasm: expose sqlite3_de/serialize(), sqlite3_malloc/free() and friends, ↵stephan2022-09-30
| | | | | noting that the former explicitly lies on use of the latter for memory management so is not generically safe for use in wasm. FossilOrigin-Name: fbc0edb5d31aa0dea92460e853f15f08c642451a7878994116b530cf172325cc
* Finish eliminating explicit Emscripten module dependencies in test code and ↵stephan2022-09-29
| | | | | fiddle. The only remnant in public code is the Emscripten-generated module load/init interface. FossilOrigin-Name: 7be78dd4efc410f13ff1ceda1fad82b309cc24de2d5106c8bd6b2adeaa13b106
* Rework the Emscripten-emitted module loader/init function such that it ↵stephan2022-09-29
| | | | | passes on the sqlite3 module, instead of the Emscripten module, to the first then() of sqlite3InitModule()'s returned Promise. This eliminates any need to mention the Emscripten module object in client-side code unless they want to configure it in advance for loading-status reports. FossilOrigin-Name: 0dbaa0e2b5abf5c23e2039ec90a3055ebb3c063aaf4e556c42546defe6fbb86d
* Wasm: expose sqlite3_exec() and use it to simplify the db-reset logic in ↵stephan2022-09-28
| | | | | batch-runner.js a bit. FossilOrigin-Name: 2e2821f782511b9d2274a89a5a922582aba18c7e9dc7ce01080e713942a56d7d
* Work around broken -Os wasm builds by adding the -g3 flag. Unrelated ↵stephan2022-09-28
| | | | | documentation tweaks. FossilOrigin-Name: f5d6bf8616341037fa3e229edf820d19acef3e0a6207a652b2b143de0a493214
* WASM API renaming. Reworked JS API bootstrap's async post-init into a ↵stephan2022-09-27
| | | | | generic mechanism, no longer OPFS-specific. FossilOrigin-Name: c42a8cb090cad1108dfd6be574202d744c59e053b505bc4c17252dc6b65d26bf
* wasm/js: rename /persistent to /opfs to account for potential future ↵stephan2022-09-27
| | | | | persistent storage options. Minor flag-handling cleanups in the speedtest1 pages. Minor API tweaks in oo1. FossilOrigin-Name: 4dc972a3656b2a9ec915bfb3f653136560c753ce4024c3f0d0d0c28f66db7a0a
* Fiddle: replace db export routine with a C-side one which works for both ↵stephan2022-09-26
| | | | | Emscripten FS-hosted and OPFS-hosted db files. Minor code-adjacent cleanups. FossilOrigin-Name: 3579a8d6f1f6cd3cd8aad9949536870c5fe7bae8c1778f700dd85d763e266b94
* Resolve "already configured" warnings from shell's main() when starting it ↵stephan2022-09-24
| | | | | up in fiddle mode. FossilOrigin-Name: 114ef3552af977b272a0baddeb9a2326484b60acfc75284e43c55530f86b413f
* Refactoring towards getting fiddle to support OPFS as a first-class citizen. ↵stephan2022-09-24
| | | | | Certain operations, e.g. import, export, and unlink, are not OPFS-aware. FossilOrigin-Name: 1b923ed6438d7fef4508936e0c4bc026a368721698b1539961e3fb3140a185cb
* Put pieces in place for fiddle to support opfs, but more cleanup is required ↵stephan2022-09-21
| | | | | in the sqlite3.js/fiddle connection. bigIntEnabled now defaults to whether the Emscripten's module has bigint enabled. Add wasm-sensible defaults for several SQLITE_ENABLE/OMIT flags in sqlite3-wasm.c. FossilOrigin-Name: 7c7fb7535e86b3960eea7f29ab7e6d5197c166b4ee64ad4a9bc0749f2869badc
* Export the sqlite3_uri_...() family of functions to wasm.stephan2022-09-20
| | | FossilOrigin-Name: 72bebc848fce5c3b4766017d016ccb2360de2bd0cb3e47e710c80dbcb6b8b707
* Add sqlite3_web_vfs_list() to JS API. Corrected OPFS VFS's registering ↵stephan2022-09-19
| | | | | itself as the default VFS. speedtest1-worker now uses the xDelete() of both the default VFS and OPFS, to avoid that it starts up with a persistent OPFS test db (the native app calls unlink(), but that unlink call operates on a different virtual filesystem than the OPFS VFS). FossilOrigin-Name: 2ec7e09139a510b9fd29e4c97283b20740a00f369193c6fecbb734f187e81b48
* Merge kv-vfs branch into fiddle-opfs. Adjust various JS APIs and apps to ↵stephan2022-09-19
| | | | | deal with the new method of handling kvvfs. Adjust speedtest1 JS build to include sqlite3-api.js so that it can use kvvfs and opfs VFSes. Permit passing of the vfs as a URL parameter to certain demo/test apps. Milestone: speedtest-worker.html?vfs=opfs runs with the standalone OPFS impl. FossilOrigin-Name: ec09f32f7ae2249aaf27388ad2062982afa8bbbb5f88d236d6d9068bf33ad93d
* Numerous cleanups in the JS bits. Removed some now-defunct wasm test files. ↵stephan2022-09-18
| | | | | Expose sqlite3.opfs object containing various OPFS-specific utilities. FossilOrigin-Name: 26e625d05d9820033b23536f18ad3ddc59ed712ad507d4b0c7fe88abd15d2be8
* When calculating kvvfs sessionStorage/localStorage size, multiply it by 2 to ↵stephan2022-09-16
| | | | | account for JS using 16-bit characters. FossilOrigin-Name: 52d1b185b9f6cee1eb3dec436f47e0f52e4621a127abfad8c27f92fd78147889
* More work on the synchronous OPFS experimentation. Numerous wasm/js build ↵stephan2022-09-15
| | | | | tweaks. Add speeedtest-wasmfs.html, the wasmfs/opfs counterpart of speedtest1.html. FossilOrigin-Name: 00ee49a3a2c148480f614e49a0ee5b35a255758c0a53693f0b464b31e7a4045b
* Add/apply various kvvfs-specific utility APIs to the JS layer to assist in ↵stephan2022-09-13
| | | | | testing and analysis. Correct a backwards default arg check for sqlite3ApiBootstrap(). Add exports for sqlite3_db_handle(), sqlite3_file_control(), and the SQLITE_FCNTL_xxx enum. FossilOrigin-Name: 0d78961870ee9f22f1ba16d423377d28dcc36e04b1e31ffd57f3e2fd51f8f0f2
* Merge kv-vfs branch into fiddle-opfs branch to add kvvfs-based wasm build ↵stephan2022-09-12
|\ | | | | | | | | and demo. FossilOrigin-Name: a7d8b26acd3c1ae344369e4d70804c0cab45272c0983cfd32d616a0a7b28acb9
* | Minor cleanups and documentation in the wasm pieces.stephan2022-09-11
| | | | | | FossilOrigin-Name: 4e6ce329872eb733ba2f7f7879747c52761ae97790fd8ed169a25a79854cc3d9