aboutsummaryrefslogtreecommitdiff
path: root/ext/wasm/api/sqlite3-api-prologue.js
Commit message (Collapse)AuthorAge
...
* Expose sqlite3_db_status() and sqlite3_db_config() to wasm, noting that the ↵stephan2022-12-09
| | | | | latter requires several internal wrappers to account for the various varidic forms (C varargs cannot be bound to wasm). FossilOrigin-Name: d5753668915c1db204fa80153614653243081ffaddea22f26ad59bb1836948b9
* Work on an alternate (slightly simpler) approach to binding JS vtabs. ↵stephan2022-12-07
| | | | | Non-eponymous vtabs are not working, for reasons as yet unknown. FossilOrigin-Name: 6a0fefb93bcccd950df211cf5c2f49660c7b92115dd01b2b508a4ab9e3ab3d23
* Rename wasm.cstringToJs() to wasm.cstrToJs() for consistency with other ↵stephan2022-12-06
| | | | | wasm.cstr... APIs. FossilOrigin-Name: cbf483ea0ba3e6dc08ad7ed654380f818544b4c3cedfdb8aa848a83298268ceb
* Add a demonstration sqlite3_vtab/module implemented in JS, based on ↵stephan2022-12-06
| | | | | ext/misc/templatevtab.c. Add oo1.selectArrays() and selectObjects(). FossilOrigin-Name: 60482c97e02bc4cafefef281be0cf0bc8c5c53232162829c137f3f7a80cdc534
* Expose sqlite3_get/set_auxdata() to wasm. Minor test app CSS tweaks.stephan2022-12-05
| | | FossilOrigin-Name: 44659ad32a9fe6363badfc5dbb0bd51d6fb2ee1c8aa47b71e9cf3dbd631fde9e
* Export collation-related APIs and strncmp()/strnicmp() to wasm.stephan2022-12-05
| | | FossilOrigin-Name: c3c56d9b944fd0d806d8dad9f0c7be3d7a5441765310908872cc525d82ab6a33
* Export sqlite3_vtab_collation() to wasm. Rename 'flexible-string' JS ↵stephan2022-12-05
| | | | | argument adapter to 'string:flexible' for consistency. FossilOrigin-Name: 15f8042fddaeabab43dd187c463d3ccc56758cbf19bf2ca4837d9087a4850c1a
* Rename 'static-string' argument adapter to 'string:static'. Replace JS unit ↵stephan2022-12-05
| | | | | tests which were lost via editing a generated copy of tester1.js instead of the original tester1.c-pp.js input file. FossilOrigin-Name: 9d81d51d5a255b42f8416da850c992a9e4c8eebc940e0702a9262cfcaa6d7b2f
* Export sqlite3_bind/value/result_pointer() to wasm. Add 'static-string' ↵stephan2022-12-05
| | | | | argument converter to support the lifetime requirements of bind/result_pointer()'s string argument. Correct an endless loop in wasm.cstrlen() when passed a non-C-string argument. FossilOrigin-Name: a94552434a657376d5ce1831de05c1b15fb153020848cd825fb0df413c3baa70
* More work on the JS side of the virtual table APIs.stephan2022-12-05
| | | FossilOrigin-Name: cb9881ec001b0e2faf047e57acfd1722d2b546255a54e0f850f568edfe2df1cd
* Export sqlite3_result_zeroblob/zeroblob64() to wasm.stephan2022-12-04
| | | FossilOrigin-Name: a60e56627fc0ef8831429941d429ee02c6ee51ce5a2c1af581dc5bc5a00d911e
* sqlite3.wasm.allocFromTypedArray() now optionally accepts an ArrayBuffer as ↵stephan2022-12-03
| | | | | its argument. FossilOrigin-Name: 75a1a796f86d289c7275666fab19013934775dcccaed44a1a61d1749a6cb99c9
* Rename wasm.xWrap.resultAdapter() X:free entries to X:dealloc for ↵stephan2022-12-03
| | | | | consistency with wasm.dealloc(). Add an undocumented feature to replace wasm.alloc/dealloc/realloc() with the C-standard allocators (after an allocator misuse led down a several-hour rabbit hole trying to discover a mis-free() violation). Related test updates. FossilOrigin-Name: d9807656f8a7c2a893d3f68ee5592f44826b8e999ae66f7d9000674b5c1b0207
* JavaScript: add sqlite3.wasm.realloc(), ↵stephan2022-12-03
| | | | | sqlite3.capi.SQLITE_MAX_ALLOCATION_SIZE, and related tests. FossilOrigin-Name: eeb84ba5de1152ef0f42105b8b285fdee9f5ad58281e60a4e0c8b1d6de1dead8
* 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
* sqlite3_js_create_file() now accepts an ArrayBuffer data source. Add test ↵stephan2022-12-01
| | | | | for OPFS-based export/re-import. The (sqlite3*) argument converter now optionally accepts sqlite3.oo1.DB instances. FossilOrigin-Name: 14a84b67fb17e16a5691ea4bf7f374123ac73a361a5d3d0efca53788d2001e3a
* Reformulate and simplify some JS tests related to the previous checkin.stephan2022-12-01
| | | FossilOrigin-Name: 9ea2d3dcf798393a7fd231e199c0e2c6302949fe2a7f2573178fb0e50c78a2f4
* Expand "sqlite3_vfs*" JS-to-WASM function argument conversions to accept VFS ↵stephan2022-12-01
| | | | | names (JS strings) and capi.sqlite3_vfs instances. Implement sqlite3_js_vfs_create_file() to facilitate creation of file-upload features which store the file in VFS-specific storage (where possible, e.g. "unix" and "opfs" VFSes). Correct an argument type check in the SQLite3Error and WasmAllocError constructors. FossilOrigin-Name: e1009b16d351b23676ad7bffab0c91b373a92132eb855c9af61991b50cd237ed
* Install sqlite3_malloc/sqlite3_free() as the JS-side WASM allocator (as ↵stephan2022-11-30
| | | | | opposed to replacing C-level's malloc()/free() with them). All tests work and this eliminates the potential for allocator discrepancies when using the (de)serialize APIs. FossilOrigin-Name: 95c78f6b46e0d8efa4313061f47677479f48610b7a7261dc8d0fb1859aca2ad9
* Rename some OPFS JS files. Prevent JS bindings of sqlite3_uri_...() from ↵stephan2022-11-30
| | | | | performing JS-to-C-string argument conversion on their first argument, as doing so is specifically illegal. FossilOrigin-Name: 79832808de2cbdba140ed9e0558f1502b51d131ab4315265315922cda7b748cb
* Refactor a significant chunk of the OPFS sqlite3_vfs init code into ↵stephan2022-11-30
| | | | | sqlite3.VfsHelper, and internal-use-only API encapsulating code relevant to creating new VFSes in JS. Intended to assist in pending experimentation with an alternative OPFS VFS. FossilOrigin-Name: e25d7b080a807e35b32cb885ea75b384130e5c6e936dfef783c5b45d9bfe77d8
* JS documentation cleanups. No code changes.stephan2022-11-24
| | | FossilOrigin-Name: 18e89a436daa18a8c972caf06b298da43c97a6ea3e2e5229dccb6920c27bfdb9
* Minor JS doc updates.stephan2022-11-23
| | | FossilOrigin-Name: 27efd63ad7fb3bf8d0d07f2c9f48652c8cacc4e697c229c8085120a8e6b50a39
* Add optional zSchema argument to sqlite3_js_db_export().stephan2022-11-23
| | | FossilOrigin-Name: 9c23644b1e5bf44bfb431a35fd1674c11ccb99e9eb0989f10175b0cb2a858eaa
* Add test app for experimenting with multi-worker OPFS concurrency. Tweak ↵stephan2022-11-21
| | | | | OPFS VFS to significantly improve the otherwise "unfortunate" concurrency situation. FossilOrigin-Name: 96f76e7616f8157a342b9e1c42f7b1feab200d182268871a2b25f67d4ee2564c
* Add sqlite3.wasm.alloc.impl() as a "public back door" into the low-level ↵stephan2022-11-07
| | | | | non-throwing allocator. Correct sqlite3.WasmAllocError constructor to behave like its usages expect it to and add tests for that. FossilOrigin-Name: cea8bf9a144d842c4755c3130273524926e8c4831d7f21c4e34d4e8c74109c8c
* Minor wasm doc touchups. No code changes.stephan2022-11-07
| | | FossilOrigin-Name: 2c448368913a844bdb5e69f8fa3bad91a2b6612ba3b7f3f650dd07b81db25a77
* Globally replace '' with "" for empty JS strings to please C preprocessor.stephan2022-11-03
| | | FossilOrigin-Name: e92e1f42bef94a1df29f66b4111ebfde93eba3759bc5d5a9c95f714508851346
* 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 internal cleanups in the js pieces.stephan2022-11-01
| | | FossilOrigin-Name: 271391b4e32220ab4c32d69f579ecd2b03eb99da898955a1ef8fffc27216719d
* Significant cleanups and expansion of the sqlite3.opfs utilities. Add ↵stephan2022-11-01
| | | | | oo1.DB.dbVfsName(). Add VFS name to worker1:open's arguments and result. FossilOrigin-Name: 86a341d7e061f946b39e8647ddd4743013b851b33ae9e6e755d8dbc53fba5286
* Add oo1.DB.exec() 'returnValue' option, which specifies what exec() should ↵stephan2022-10-31
| | | | | return. Defaults to the db object and enables direct return of the result rows array or a list of the individual SQL statements. Other code-adjacent internal cleanups. FossilOrigin-Name: 69d36a6aa5e2cd79d26c0fd3e0d20fe8838fd1be97db07725233bfff1dfe6643
* Move the sqlite3.capi.wasm namespace to sqlite3.wasm. This causes a tiny bit ↵stephan2022-10-29
| | | | | of naming confusion with the sqlite3.wasm *file*, but seems to make more sense than having it as a sub-namespace of capi. FossilOrigin-Name: 3f16eb18d6186ca972fca952ccac18649e7a905213f589e53c0c9333e695448d
* Remove sqlite3_interrupt() from the WASM build, as it is essentially ↵stephan2022-10-28
| | | | | impossible to employ in JS's threading model. FossilOrigin-Name: e85387590061edbb6cdc04de792ab86f43afaa5c8d1b0792206cb5b481c7d76a
* Add ext/wasm/module-symbols.html. Adjacent minor JS touchups.stephan2022-10-28
| | | FossilOrigin-Name: 24f12e681e06e3b71a6ac9c82255fe0270953a74c711405841f7e385eeafe874
* Minor doc typo fixes.stephan2022-10-27
| | | FossilOrigin-Name: ed8d3f25a4d6ac04d9f7918c791d8d2c6f23ce846278ca63f8fbadb7ea27369f
* Expose sqlite3_randomness() to WASM and add a custom binding for it which ↵stephan2022-10-27
| | | | | can populate a JS byte array. Add WhWasmUtil.isPtr(). FossilOrigin-Name: 333e67076b4bc967bb543ef8e265c63f6e3498c38ac121a7d1eff4a1d7a71c63
* Expose sqlite3_vfs_unregister() to WASM and unregister kvvfs in Worker ↵stephan2022-10-21
| | | | | threads to avoid its unintended use there (in contexts other than local/sessionStorage). Correct registration of window functions, extend oo1.DB.createFunction() to support window functions, and add window function tests to tester1.js. Correct an incorrect 1-arg handling case for DB.exec(). Add per-test assertion counts to tester1.js. FossilOrigin-Name: f07ce15479b7224b0d1ba9f147a433136e70c1461aa667d2737d4a918f778f55
* 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