aboutsummaryrefslogtreecommitdiff
path: root/ext/wasm/api/sqlite3-api-prologue.js
Commit message (Collapse)AuthorAge
...
* ext/wasm/module-symbols.html: add a hyperlink to the API docs for each ↵stephan2022-12-12
| | | | | exported sqlite3_...() function. FossilOrigin-Name: 01d3a9bba3120cfec3f752048281f18ce7ab48fa7584750c097233a9ce095a20
* Expose sqlite3_txn_state() to wasm.stephan2022-12-12
| | | FossilOrigin-Name: f6f3397a4667b15a96bdf4189c54789d622fd90351405e963d7f56ac93a9344c
* Expose a number of infrequently-used sqlite3_...() functions to wasm whose ↵stephan2022-12-12
| | | | | absences were noticed while documenting. FossilOrigin-Name: 3144e7c0b8633d99daa07d75dabfe6e115ad401110f6f3c85f768e973299f3d9
* Expose sqlite3_column_value() to WASM and add sqlite3_column_js().stephan2022-12-10
| | | FossilOrigin-Name: 7783aa4af1331190fd1f42a71bb724041e2e82b51745f9740926e4ead83a97ed
* Refactor the internal JS routines for converting UDF results and errors to ↵stephan2022-12-10
| | | | | JS into public APIs. FossilOrigin-Name: 35d1d63c7d60119b64341c561294890812837d5432d1d7bed3ed88d6212fbfa0
* Export sqlite3_result_subtype() and sqlite3_value_dup/free/subtype() to WASM.stephan2022-12-09
| | | FossilOrigin-Name: 4600a7bbdc4cbe14591d48ea19fe5f7de3a0c10a14cdd97fd51e263a13163d10
* Expose sqlite3_value_frombind/nochange/numeric_type() to WASM. Add a flag to ↵stephan2022-12-09
| | | | | sqlite3_value_to_js() to cause it to return undefined, instead of throwing, if no conversion can be found. FossilOrigin-Name: de8fc4bf34f80f320012a0e506ed8e3e24806daf67845d5dabb00b916108f6ef
* Refactor the sqlite3_value-to-JS conversion from an internal detail to ↵stephan2022-12-09
| | | | | sqlite3.capi.sqlite3_value_to_js() for use with routines like sqlite3_module::xFilter(). FossilOrigin-Name: f6dbf280f99809a80c99337e4c22a86dea7a35ae41ae9a69144c4502385a0a1f
* Remove some unused sqlite3_status() codes from the JS API. Add custom JS ↵stephan2022-12-09
| | | | | wrappers for sqlite3_create_collation/_v2() which accept JS functions (plus tests). Expand the argument options for sqlite3_wasm_db_error() to enable it to translate exception objects to C-level errors. FossilOrigin-Name: 073a2f1eb006230ae0995a5ea6c789407bcaa819ec15b5064c66d8973ed4671a
* Rename the oft-used, verbose sqlite3.wasm.get/setMemValue() and ↵stephan2022-12-09
| | | | | get/setPtrValue() to peek/poke() and peek/pokePtr(). The old names are retained as aliases just in case any client code actually uses them, but they are now deprecated. FossilOrigin-Name: ad0a8139b0b025f8e9d2eca0c303557ef10fdfab8c8b65afb08c510a804073d5
* Export sqlite3_status() and sqlite3_stmt_status() to wasm. Expand the ↵stephan2022-12-09
| | | | | arg/return semantics of wasm.get/setPtrValue() and get/setMemValue() to simplify handling of multiple pointers. FossilOrigin-Name: e144fd5c88fa4151429a2fef3daf389588402e158267f0afa0dfd142527d76b9
* Expose sqlite3_table_column_metadata() to wasm.stephan2022-12-09
| | | FossilOrigin-Name: c31eb509e5cb1025de058132ee9a45d70c84ee47a6abe18811a65ce339f062a0
* 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