aboutsummaryrefslogtreecommitdiff
path: root/ext/wasm/api/sqlite3-wasm.c
Commit message (Collapse)AuthorAge
...
* Expand JS tests for db export/import and document reason it cannot currently ↵stephan2022-12-02
| | | | | work with kvvfs. Fix a minor JS build dependencies bug. Update page title with PASS/FAIL prefix for tester1.js to improve overview when launching multiple test tabs. Add ability of tester1 should-run-test predicates to report why a given test is disabled. FossilOrigin-Name: 75f610d3a4cf3d972220f9abc27cdf5990451e3835ceb9cf66973934004dfc5c
* Add optional zSchema argument to sqlite3_js_db_export().stephan2022-11-23
| | | FossilOrigin-Name: 9c23644b1e5bf44bfb431a35fd1674c11ccb99e9eb0989f10175b0cb2a858eaa
* Remove some outdated code comments. No code changes.stephan2022-11-13
| | | FossilOrigin-Name: 80ff592a9d0157bfa8bd1f9959c3aa26cab0ec16fdccf7b58a7523b8912c1a8c
* Correct sqlite3-wasm.c's SQLITE_DEFAULT_CACHE_SIZE (it's measured in kb, not ↵stephan2022-11-04
| | | | | bytes). FossilOrigin-Name: 479ad980dfe509403e184e39a5aa441171e47b3297e05039f85516e72e9f15be
* Minor build cleanups and fix a harmless race condition in the OPFS part of ↵stephan2022-11-02
| | | | | tester1.js. FossilOrigin-Name: 70ee6ee014bc4e2c1daa9b4a8909cf76ccecf32de1eb39055f20d3d0b1daa1bd
* Add sqlite3_wasm_vfs_create_file() to replace Emscripten's ↵stephan2022-11-02
| | | | | FS.createDataFile() in a (mostly) VFS-agnostic way. Add a test for worker1's export (to bytearray) support. Re-add worker1 open-from-bytearray using sqlite3_wasm_vfs_create_file() but it's untested (requires a new interactive test app or maybe reconsideration). FossilOrigin-Name: b35e1225c91a3cadc0d25af1e4e790237256d194990faa13190e343ed03e11c5
* Minor WASM build cleanups. Enable custom Module.instantiateWasm() when not ↵stephan2022-10-30
| | | | | in WASMFS mode (where it doesn't work). Add sqlite3.debugModule URL param to enable some module-init-time debugging output. FossilOrigin-Name: 50f678846a2b3c3d0818f0bae89f2ee86252a2e6a9c7029ebaae3953ca0fa14c
* Add SQLITE_DQS to the compileoptions_used list, per request in [forum post ↵stephan2022-10-21
| | | | | 8b1060122b|forum:8b1060122b]. Force DQS=0 in sqlite3-wasm.c. FossilOrigin-Name: fcd9e0dbe3226f3f7ccc15b11fc3aa3b8058571bef274c25a33e9753e22f7551
* 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
* Rework sqlite3_wasm_vfs_unlink(), add sqlite3_wasm_db_vfs(), update some docs.stephan2022-10-20
| | | FossilOrigin-Name: cdd46858f0e63bc7bfce8e339b3db9efdec43b6443ee76563a847f53d0176831
* 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
* 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
* Minor doc cleanups and corrections in sqlite3-wasm.cstephan2022-10-12
| | | FossilOrigin-Name: 5144c122a921e4240901cf4eb46347b92213273eec7cf0977952ab2b60722c27
* 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
* Minor cleanups and additions in sqlite3.capi.wasm.pstack.stephan2022-10-04
| | | FossilOrigin-Name: 97bd670d3859bd3f2e62c15065b238b85ef614f26479e56a14be42c5784aedf4
* Set default page cache size to 16mb in wasm builds. Fix an off-by-one ↵stephan2022-10-03
| | | | | counter in sqlite3_wasm_enum_json(). Minor coding style conformance tweaks. FossilOrigin-Name: 72a9e589cc318ec50941739e2edf2c0636284b316c3bf87b71fd363b37619da3
* Omit WAL mode from the wasm build.stephan2022-10-03
| | | FossilOrigin-Name: 88efe2a62b81e5ee9119f54204e397fda59666a327158c7b7c972e84a716869e
* 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
* Partial revert of [a82e6faaa642] to remove the 'I' alias for 'j' wasm ↵stephan2022-10-03
| | | | | function signature letter. In hindsight, that change seems premature. FossilOrigin-Name: dcd46af9141f4edf816010923941a76d0edd3f18cfe429c52f599ad2a0d52651
* Minor JS API tweaks prompted by documenting them.stephan2022-10-03
| | | FossilOrigin-Name: a82e6faaa642b09d241232c4daa67134d4dfa24bf3ca3725740346ca5269b381
* More fleshing out of sqlite3.capi.wasm.pstack.stephan2022-10-02
| | | FossilOrigin-Name: eb5726677a727a958df11f1fba078d30c7c0ba2a9bdb158e8641b35b5f971af3
* Pedantic constness tweak.stephan2022-10-01
| | | FossilOrigin-Name: c8a173cf16d2567bf9b13f52904077a2e7209776c76613c7bff59cd66e24bf11
* 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
* 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
* 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
* wasm: change StructBinder signature for sqlite3_file::pMethods from 'P' to ↵stephan2022-09-26
| | | | | 'p' to eliminate an unnecessary and inconsistent level of magic. FossilOrigin-Name: 85f2e877e53899860af4dc6630044b471a9c7c82faba1f4e1e60ae991460b943
* 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
* Doc cleanups and additions. Add a way for the OPFS async runner to propagate ↵stephan2022-09-21
| | | | | exception text to the calling thread. FossilOrigin-Name: 5c5e80652825cf883e6c17809cb98f2bf17d5feac2d263f6f492479154730dab
* 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
* | Correct the result code from kvstorageRead() for the OOM case to be a ↵stephan2022-09-11
| | | | | | | | | | negative value. FossilOrigin-Name: cdbf09fa1b0c93aeb3222a157de33a4688ae629c2b829ffff0f1f62364c5ae1c
* | Minor cleanups and docs for the EM_JS() impls of the kvvfs read/write/delete ↵stephan2022-09-11
| | | | | | | | | | ops. FossilOrigin-Name: 53b7572e441be4b4b29b4228d0f95b24457d7faaf6c0b568ed5c970a55e21ffb
* | Add EM_JS() impl for kvstorageRead().stephan2022-09-11
| | | | | | FossilOrigin-Name: 06610314fcf644f323c2f7ae11d7f4349b195e66d0ebbee590438dd99d97eb96
* | Initial prototype impls of write/delete-key ops for the pending kvvfs which ↵stephan2022-09-11
| | | | | | | | | | use sessionStorage or localStorage for db page storage. read-key op is pending. FossilOrigin-Name: a4bd96f5348e607d0fcb627b751f9d86a188173a4b3bfb2c95f92913a78bd31e
* | Get speedtest1.js working with WASMFS/OPFS.stephan2022-09-06
| | | | | | FossilOrigin-Name: 40e60f570d4f489d58d12e27c1c067b41d6c5a5e374c5fce0baa8881ef183216
* | Refactor JS API amalgamation such that the bootstrapping/configuration is ↵stephan2022-08-22
| | | | | | | | | | deferred until the whole amalgamation is available, to facilitate providing clients with a way to initialize the API with their own config (noting that we're still one small level of refactoring away from being able to actually do that). FossilOrigin-Name: 9dbe9a6aecec43b51057375ef1d2d632db0d17eac8b7552c20cc91fc2f1a55d1
* | Cleanups in the wasmfs/opfs integration but disable it in order to get the ↵stephan2022-08-13
| | | | | | | | | | build into a known-working state before continuing with experimentation. FossilOrigin-Name: 41045be752a5bd7966849638f3ca56f4905308df70f79f2cb6196ca7dce9d525
* | Build fiddle with WASMFS OPFS support and attempt to use it if available. It ↵stephan2022-08-12
|/ | | | | does not work because of an inexplicable exception in Emscripten-generated code and perpetually-locked db, but it's not yet clear why. FossilOrigin-Name: a16f0a46ec88c560f73d5664e4bf53fb5dd1a22e99a92c11b5c8d784816c3282
* wasm: document the role of sqlite3-wasm.c. Other minor doc updates.stephan2022-08-12
| | | FossilOrigin-Name: 4c10b9b18feca82440273f8192fef951ad051bbfd8aad4d3c840cf6375130afd
* wasm opfs: error handling fix for an impossible-to-reach error case. Minor ↵stephan2022-08-10
| | | | | cosmetic tweaks in the wasm JSON enum. FossilOrigin-Name: 683a3b937e608a5ecaf7f63f054e8a63179d67c8b2348bf843e5e68f27a369f5
* wasm refactoring part 2 of (apparently) 2: moved ext/fiddle/... into ↵stephan2022-08-10
ext/wasm and restructured the core API-related parts of the JS/WASM considerably. FossilOrigin-Name: 27f9da4eaaff39d1d58e9ffef7ddccf1e41b3726914f754b920e3e1fb572cba6