stephan
|
65f7942d06
|
Add JS bundler-friendly JS build. Minor test code cleanups.
FossilOrigin-Name: 24d3a53dea5e596230558e233cbbd9d0288b4c394cd5ea7b650fd99bff4cde2e
|
2023-01-28 04:20:46 +00:00 |
|
stephan
|
69141f52be
|
Update ext/wasm/README-dist.txt for the bundler-friendly build.
FossilOrigin-Name: 6a5c4f6b19aa0704efe7f789102f757a1ed05d6542f37c7aa37a4439783944a3
|
2023-01-27 20:25:39 +00:00 |
|
stephan
|
6a3e2d3776
|
Add a feature idea note to DB.exec(), derived from a forum discussion.
FossilOrigin-Name: 792f43209c4b6e85386b6b3906814b7f2ad310d50ba563b3fd1cb37e55adf8db
|
2023-01-27 19:56:40 +00:00 |
|
stephan
|
cf73cb2fbc
|
Cherrypick [3773934e91c20ca243] into trunk.
FossilOrigin-Name: 50cf4300a6a92302010fa4a7662db82bf55180a4930771f0d3c07e558bc87e7d
|
2023-01-27 17:19:30 +00:00 |
|
stephan
|
aca8ce1535
|
Extract emcc version in JS build and use it to conditionally set build flags. Initially a workaround for [https://github.com/emscripten-core/emscripten/issues/18610|Emscripten ticket #18610] but may have other uses.
FossilOrigin-Name: 3773934e91c20ca2433cc414aaba75de9a4a4318fd1126fb781dba510ddefd94
|
2023-01-27 17:14:55 +00:00 |
|
stephan
|
9dc093d095
|
Work around a JS null pointer deref which could be triggered from the dev console, but not (it seems) from client-side code.
FossilOrigin-Name: eabb551b8b3d33fc3a327ecf7225436a3a3f616901e22c868fd76a5e3adc7b3f
|
2023-01-27 07:53:49 +00:00 |
|
stephan
|
ca86a5351e
|
Cherrypick [fa784101775b7|emscripten ticket #18609 workaround] into trunk.
FossilOrigin-Name: 9a26fae545b9c97129893b83ff97e62b1c477eccd1379af1dce4a3cc4fa9f932
|
2023-01-27 05:17:10 +00:00 |
|
stephan
|
c64a3fa6c6
|
Work around upstream emscripten 3.1.31 bug [https://github.com/emscripten-core/emscripten/issues/18609].
FossilOrigin-Name: fa784101775b795077a23c211b5b16f51ad5a13967c284511f310dfcbfa9f77a
|
2023-01-27 05:14:34 +00:00 |
|
stephan
|
a0013fbe87
|
More work on creating a separate sqlite3.js build which is hopefully friendly to JS bundlers.
FossilOrigin-Name: b7b896fb448a7f46eb88eadadb1359255aec637a384cabcdd526276a02f4f0b4
|
2023-01-27 03:18:16 +00:00 |
|
stephan
|
67bfea4ea6
|
Resolve a nested if-block bug in ext/wasm/c-pp.c which caused output after a nested block to be unduly elided. Remove a kludge, added in the previous check-in, which worked around that bug.
FossilOrigin-Name: 7a026a4b24d57c1b0970923b972dd42c3f1bb5b282f908079075468b2e1bf601
|
2023-01-27 02:21:16 +00:00 |
|
stephan
|
0cd38cd2b9
|
Beginnings of a bundler-friendly build of sqlite3.mjs. Not yet ready for downstream testing.
FossilOrigin-Name: 4271bf5f41df091696f1dcfc4ffe7a60d24066fc75c896941e0b56de95fe5f89
|
2023-01-27 01:33:12 +00:00 |
|
stephan
|
0945197a39
|
End-of-line whitespace cleanups and doc typo fixes. No code changes.
FossilOrigin-Name: bdfd72a083fadd724030c4c89adae71426e1ddd402c6bc5abf40801ecf3253cf
|
2023-01-26 20:08:59 +00:00 |
|
stephan
|
0bcded30e5
|
Minor API doc cleanups and JS code simplification.
FossilOrigin-Name: f608a3a45609693c1c0237f12c394275ec9a6225fa986e62345f21af763293a0
|
2023-01-21 16:53:01 +00:00 |
|
stephan
|
8a45f68b1c
|
Emit sqlite3-api.(m)js during the JS build process, which are the JS APIs without the Emscripten/wasm-loading parts. They are hypothetically useful for arbitrary build environments/toolchains but have notable caveats related to the wasm imports, as elaborated on in the makefile.
FossilOrigin-Name: 966b55c513a14c6ab3ec128cfe6d157ecd9bec32e3fce2f559f130249cec50ab
|
2023-01-18 17:39:04 +00:00 |
|
stephan
|
5d2a25b254
|
Remove the JS-side SQLITE_WASM_DEALLOC sanity check which triggers the problem mentioned in [688c5c13d156] and [ae0196d86ee8], for reasons covered in the code comments, per discussion in [forum:e5b20e1feb|forum post e5b20e1feb].
FossilOrigin-Name: 65ff3200c6009a1649fc108d7ce36f5c014185ba46bbf98471ec86eaeb572656
|
2023-01-04 03:14:06 +00:00 |
|
stephan
|
e364a9da72
|
Add some docs explaining a particular piece of [ae0196d86ee8]. No code changes.
FossilOrigin-Name: 7f96803c1cbd0633367173ab0a67a8b301b9e0746e460c50d506b536c15db0a0
|
2023-01-02 20:52:46 +00:00 |
|
stephan
|
b1cc895c92
|
Another reformulation of SQLITE_WASM_DEALLOC to attempt to work around a Safari-specific quirk reported in [forum:5489305f601b8c3f|forum post 5489305f601b8c3f].
FossilOrigin-Name: ae0196d86ee8ca424b5ef5a43c32988f4ab5131ea146669bc1467e31a2384901
|
2023-01-02 20:07:30 +00:00 |
|
stephan
|
a347927d60
|
An alternative solution to mapping SQLITE_WASM_DEALLOC to the proper function pointer in JS, to account for a Safari-specific quirk reported in [forum:e5b20e1feb|forum post e5b20e1feb].
FossilOrigin-Name: 688c5c13d156f987b895df1d5a5b770616b0d9caec4726e03ba122eb8539e7b2
|
2023-01-01 12:22:16 +00:00 |
|
stephan
|
010ffff8d7
|
Add sqlite3changeset_new/old_js(), which work like sqlite3_preupdate_new/old_js() but on changesets.
FossilOrigin-Name: e8afad630b085a9208491e0516a6a30c9cda77a20b1aa2cba49b2f44eb9fa2f8
|
2022-12-27 22:46:49 +00:00 |
|
stephan
|
294968e030
|
Expose sqlite3_preupdate_hook() and friends to the JS API.
FossilOrigin-Name: cc02783a1210a083683320fae1ec1519e45b8e3003a9e32809d808513a2ce06b
|
2022-12-27 14:34:32 +00:00 |
|
stephan
|
de75c9c5a0
|
Add links to module-symbols.html for newly-added APIs.
FossilOrigin-Name: 335ef03eb9694d1fd123f113f235cd34e97834fadc5f7c80489b6513be45d070
|
2022-12-27 12:25:28 +00:00 |
|
stephan
|
69d8b3636e
|
Add two more tests to [f99f8e3ecfe20].
FossilOrigin-Name: 9cffccd335b11feb6a5beadb26e1a68af7b6b1b3c953063dcf6ef74edf3c59b1
|
2022-12-27 12:17:20 +00:00 |
|
stephan
|
55a21fbcef
|
Expose sqlite3_commit/rollback/update_hook() to JS API.
FossilOrigin-Name: f99f8e3ecfe205337996ee61c0b9f139d3e8788b14f32e26560888b3a16564de
|
2022-12-27 12:13:01 +00:00 |
|
stephan
|
c8f245ab5c
|
Add an optional argument to oo1.DB.transaction() to specify an explicit BEGIN qualifier.
FossilOrigin-Name: 507335c12b1dbe21d180cf6f0a0deb4cc737417acb44c8f1d8fac98b86f62b01
|
2022-12-27 11:40:05 +00:00 |
|
stephan
|
84261bac96
|
Expose the auto-extension API to JS and reorganize some nearby code.
FossilOrigin-Name: 52b229d11d82bfb81c8b63e252c51c57a34dc50498dd685451588c185873c628
|
2022-12-26 17:15:05 +00:00 |
|
stephan
|
64fa85bb5e
|
Document sqlite3.capi.sqlite3_prepare_v3() as accepting an ArrayBuffer and ensure that it can.
FossilOrigin-Name: ae3ae92ec45d3d5de92e70876502f8108fc3fcd87848e86c2b83f8842f1ff139
|
2022-12-26 15:08:48 +00:00 |
|
stephan
|
d9cfd0f339
|
Correct some internal-use JS docs and update the 'string:flexible' type conversion to accept an ArrayBuffer (as it was recently documented to).
FossilOrigin-Name: eff5d3bec29043cc1182bbb5229040dac5ff50264d025e354736bb63b4bc97a0
|
2022-12-26 14:55:00 +00:00 |
|
stephan
|
67e4f6fcdb
|
Only add an on-db-close cleanup entry for collations if adding the collation succeeds and xCompare is-a JS function.
FossilOrigin-Name: 18a5480f1e0dca55703b43fa17685a4cc577cab8841ce47c807af02348ad85ee
|
2022-12-26 14:25:21 +00:00 |
|
stephan
|
171aa209fa
|
Extend [0e69b2c379e618] to support uninstalling stale JS-to-WASM function pointers added on behalf of UDFs.
FossilOrigin-Name: 7a46e629dcbf97ae037c5abb39306af7ad55f1910c1e962373e09d88d8bd5a33
|
2022-12-26 13:45:10 +00:00 |
|
stephan
|
7197f0a8f2
|
Add JS infrastructure which enables sqlite3.capi.sqlite3_close_v2() to clean 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
|
2022-12-26 13:00:58 +00:00 |
|
stephan
|
20170adf14
|
Reimplement sqlite3.capi.sqlite3_close_v2() and sqlite3session_delete() as a 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
|
2022-12-26 11:13:09 +00:00 |
|
stephan
|
b87efce2c0
|
module-symbols.html: add some missing links to C-side API docs for recently-added JS counterparts.
FossilOrigin-Name: 7d4f4e96f33f37b0774cb8df22ed1ef33062534653a4fadf606704b855e28c49
|
2022-12-25 23:54:16 +00:00 |
|
stephan
|
7103801df1
|
Update JS worker #1 API and related tests for recent API changes.
FossilOrigin-Name: d797e183e96e04520636865204c02307b751fdc2949a04587de9259a1733e37b
|
2022-12-25 23:45:59 +00:00 |
|
stephan
|
ec35e92d1d
|
Rename the new wasm.irSizeof() to sizeofIR() because that seems clearer.
FossilOrigin-Name: 49a83ca3ba46d3ae8021fbdd72b48ce9181eea6845fa7bb7aa83b16fad1728be
|
2022-12-25 22:55:45 +00:00 |
|
stephan
|
6431f860ae
|
Minor internal API doc correction and extend a test for oo1.DB.selectValues().
FossilOrigin-Name: b7295b1ca700945ae4e89be69f954dce9960e8975664e620898392b2cc78d452
|
2022-12-25 22:49:55 +00:00 |
|
stephan
|
9f1adb8c12
|
Add sqlite3.oo1.DB.selectValues(). Correct a logic error which could cause 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
|
2022-12-25 22:44:13 +00:00 |
|
stephan
|
3caf13f1cb
|
Merge wasm-session-api branch into trunk, adding the session API to the JS/WASM components.
FossilOrigin-Name: dfb8b651fa4faef2d3307a05512cdc479398484c3a59715827179c363861a777
|
2022-12-25 20:25:44 +00:00 |
|
stephan
|
9d61db1944
|
Add basic session API JS tests.
FossilOrigin-Name: 64e032602cf420851c8029603c76f5512000d1c9a40fa7a545528d69d6d1d4cc
|
2022-12-25 20:22:20 +00:00 |
|
stephan
|
7d59d90a5b
|
Add sqlite3.wasm.irSizeof() and extend certain allocation functions to make use of it.
FossilOrigin-Name: 1cbc7b1875e8611b9db7a747b4c9499501450deaf90c929d212511837d6f72b6
|
2022-12-25 20:05:11 +00:00 |
|
stephan
|
7a5544b958
|
Add tests confirming that JS sqlite3_exec()'s SQL argument participates in the 'string:flexible' type conversion.
FossilOrigin-Name: 926d0c61a391c601adc2804d3fdaa8b667ae2abd565939cddfa12d5151b098f8
|
2022-12-25 17:12:24 +00:00 |
|
stephan
|
73bf9d5fed
|
Replace the "manual" implementation of sqlite3.capi.sqlite3_exec() with a briefer "automated" one via the [7f9ace1b11a67] feature addition. Minor code-adjacent internal cleanups.
FossilOrigin-Name: 4888957baf18c6763f959fbba998a74156ff656368779107f502b926e9e9d949
|
2022-12-25 17:09:34 +00:00 |
|
stephan
|
031ee6b9da
|
Remove duplicated JS binding of sqlite3changeset_apply_v2().
FossilOrigin-Name: 2e8336b6e1cba89dbcc11d6316e39c929bf8b018a18b92efc232abd47e0a5cc6
|
2022-12-25 16:20:05 +00:00 |
|
stephan
|
8b5a5ef030
|
Add the address of the associated db handle to the sqlite3_trace_v2() output originating from sqlite3.oo1.DB's trace flag.
FossilOrigin-Name: 0a36568c5a3db56a8ad23fd8abc672c5a7f1abed55984d902842ffd3ebb816e8
|
2022-12-25 15:28:19 +00:00 |
|
stephan
|
3494ec15e5
|
Update the session-related JS bindings to account for today's internal API changes.
FossilOrigin-Name: be63944d4114f53f2dab65bc6c1b85f4766a4ea14ee7b2690acde239a2a0bf54
|
2022-12-25 15:14:10 +00:00 |
|
stephan
|
04071524ae
|
Merge trunk into wasm-session-api branch.
FossilOrigin-Name: 7f8f1acd82be7dc2eb2147d96299b1b443e86774dfe0b0a8d32669a0500fc9c6
|
2022-12-25 14:13:52 +00:00 |
|
stephan
|
7015aa9f49
|
Add missing sqlite3_context_db_handle() JS binding. Reimplement sqlite3_set_authorizer() and sqlite3_set_auxdata() JS bindings to take advantage of [7f9ace1b11a67]. Teach FuncPtrAdapter to emit a console.warn() message if it is invoked after the library is bootstrapped, the goal being to inform users that it's an internal API and should not be invoked from client-side code.
FossilOrigin-Name: 8e3d4f6294037396e388ec21abb18bf0201a6bec6ff004730cc5d11b705a6d2b
|
2022-12-25 14:04:06 +00:00 |
|
stephan
|
485229e147
|
Enhance sqlite3.wasm.xWrap.FuncPtrAdapter to be able to handle sqlite3_create_function() and friends and reimplement those bindings to use this feature (this will also simplify certain session API bindings). Interal API changes only with no client-side breakage.
FossilOrigin-Name: 7f9ace1b11a6703031790af9cf08ab25df25850a86e6ca2a7aeaefd8aa395e6d
|
2022-12-25 12:51:53 +00:00 |
|
stephan
|
75c04ba89c
|
Simplify the signature for JS functions, as opposed to function pointers, passed to sqlite3_exec(), eliminating the superfluous initial two arguments. Update related tests to demonstrate both function-passing approaches.
FossilOrigin-Name: e7cc70cdda426863f82ebe1305f4c3053824c5a605b1516b0b7f205f1203178b
|
2022-12-25 10:22:27 +00:00 |
|
stephan
|
4099b3cab3
|
Replace JS-side use of SQLITE_TRANSIENT with the new SQLITE_WASM_DEALLOC, reducing the amount allocation/copying required by sqlite3_bind_blob/text() and sqlite3_result_blob/text(). Remove the 'experimental' log message from the virtual table tests.
FossilOrigin-Name: ffe2999a91a7dec129a38afb675fe9e539d7c347886bfea85cba55f6367d54d1
|
2022-12-24 15:28:45 +00:00 |
|
stephan
|
cede6384fd
|
Extend oo1.Stmt.bind() to accept ArrayBuffer instances to bind as blobs.
FossilOrigin-Name: f76bd30137fbff981625ffcb28cddd5e8651803dfc3f2d8d7801ead33496311d
|
2022-12-24 14:16:02 +00:00 |
|
stephan
|
0db1c90137
|
Add a test for the (failure) case of client-level code calling the oo1.Stmt constructor directly.
FossilOrigin-Name: 6a37874db04f3b4842994ad17fc74cb6222f8ea0fa1315a23aff1ffa69bcd12a
|
2022-12-24 13:46:27 +00:00 |
|
stephan
|
4b4ae86445
|
oo1.DB.exec() rowMode="$columnName": a minor optimization and a preemtive fix for a hypothetical corner-case bug.
FossilOrigin-Name: 0b2df22bd92914708ad0851d0401ad2cf3edb1968b88b2c07fe40792a731c5ba
|
2022-12-24 11:16:49 +00:00 |
|
stephan
|
0cdc01d01a
|
If sqlite3.oo1.DB.exec()'s callback returns a literal false, stop step()ing over results as if the end of the result set had been reached. Unrelated minor code-adjacent cleanups.
FossilOrigin-Name: 33a58c8ece3b37a8edc3434af36643e2d489a53a672d778c5b77e66666045c30
|
2022-12-24 01:59:42 +00:00 |
|
stephan
|
027afccdcd
|
Reimplement JS's sqlite3_bind_text/blob() with hand-written bindings to permit more flexible inputs. Add automated JS-to-C function conversion to sqlite3_busy_handler(). sqlite3.wasm.xWrap()'s '*' argument conversion no longer treats JS strings as C-strings: those conversions require explicit opt-in via the 'string' converter (or equivalent).
FossilOrigin-Name: 96ba44946b3e88b6aa305c4363cbbfeab0d9120b3d8c4d2587d68b9293ea7cc6
|
2022-12-23 23:46:33 +00:00 |
|
stephan
|
bb769f0b4a
|
Merge trunk into wasm-session-api branch.
FossilOrigin-Name: 6cdb036d8e8c5ddb0c6578aeefe318e74d7a90228e57b9f9047057dae3252963
|
2022-12-23 21:23:26 +00:00 |
|
stephan
|
ab9c2d571e
|
Internal JS cleanups. Correct part of [ac136925a645] to account for the eTextRep flag being able to hold flags other than the encoding.
FossilOrigin-Name: 1dfc03ab1e0269807beef27bf884ab9ead7553d4a5f6ed213f812d7fa052045f
|
2022-12-23 21:10:49 +00:00 |
|
stephan
|
77eac0507c
|
Merge trunk into wasm-session-api branch.
FossilOrigin-Name: f1decc831fe0dc8523956e74474d9663852b0e5b56240dd8504952726e713a97
|
2022-12-23 19:33:22 +00:00 |
|
stephan
|
3705f38ab0
|
Consolidate/unify how the JS bindings of the create_function/collation family of functions react to a non-UTF8 encoding: they now treat a falsy value as SQLITE_UTF8 and fail with SQLITE_FORMAT for an invalid encoding.
FossilOrigin-Name: deffe6fb211410fa1a1fbca824a52b4e09b54d4b4f4a4e12d71c9e4b7e8606fb
|
2022-12-23 19:16:45 +00:00 |
|
stephan
|
ace682e149
|
Explicitly omit threading and extension loading from the ext/wasm/c-pp binary build to avoid a link error on some systems.
FossilOrigin-Name: 5d9a14715c25efcd81cadafabf03aad7213251bd1b3dc181939c2dba8d942fb6
|
2022-12-23 18:38:14 +00:00 |
|
stephan
|
7298c2e099
|
Add SQLITE_ENABLE_MATH_FUNCTIONS to the list of feature flags in sqlite3-wasm.c.
FossilOrigin-Name: 58503cd148c9613abfaf7c1386c34806150bd521966864ccbb821ea7dede8e5a
|
2022-12-23 18:25:48 +00:00 |
|
stephan
|
a9e1d96cd8
|
Cherry-pick [c4dab53b8ea3401abd] for sqlite3.wasm.xWrap() optimizations.
FossilOrigin-Name: 9b97412d3aa791870016ab3c6f565b6a6afa1764f98e969833aec093b9b29919
|
2022-12-23 18:19:28 +00:00 |
|
stephan
|
b5915699d0
|
Internal cleanups and minor speed optimizations in the sqlite3.wasm.xWrap() infrastructure.
FossilOrigin-Name: c4dab53b8ea3401abd57671b8f3cb39fa4431b864d4c4e14ae24592f8d4cba0a
|
2022-12-23 18:14:36 +00:00 |
|
stephan
|
0f29f17bf6
|
Add sqlite3.capi JS bindings for the sqlite3session_...(), sqlite3changeset_...() and sqlite3changegroup_...() APIs, noting that they are completely untested. Aside from missing tests, these bindings reveal a slight string-argument-type shortcoming in the callback function pointer "reverse binding" which should ideally be resolved before publishing them.
FossilOrigin-Name: 0a39172ee134816f5ce17a403b960e9c22bb56efd5bcf77ecde465efe0d88b1d
|
2022-12-23 14:11:54 +00:00 |
|
stephan
|
cc1cc9d7b7
|
Initial pieces for binding the session API to JS. Far from complete. See [forum:210e36a1e3 | forum post 210e36a1e3] for the discussion.
FossilOrigin-Name: cd8c100808da1043fcf63555f48f30c90272c48c6627321ceb0a0995b34733d1
|
2022-12-23 11:46:26 +00:00 |
|
stephan
|
c6c1d7bfbd
|
Minor sed script tweak in the wasm GNUmakefile for BSD portability, as reported in [forum:4a97813fcbd4f63e|forum post 4a97813fcbd4f63e].
FossilOrigin-Name: 49efcf6d9f894c28a3ffb350a7c5f0ffd12c7cbf61f5c27f76eb7f777b8a24c5
|
2022-12-19 14:46:17 +00:00 |
|
stephan
|
3ce8badcba
|
Update test-opfs-vfs.js to account for recent API changes. Reported in [forum:4a97813fcbd4f63e|forum post 4a97813fcbd4f63e].
FossilOrigin-Name: 2a636746360c109f1d39fc352b9f1c83a739735520252a264c774e848597475d
|
2022-12-19 14:43:17 +00:00 |
|
stephan
|
ba1e6f8279
|
JS namespace updates in ext/wasm/api/README.md.
FossilOrigin-Name: ca59e736b1839c30a820dd5795b4534e1565387ef701423451ea4c503a9701ea
|
2022-12-18 12:00:10 +00:00 |
|
stephan
|
a4d04c59ba
|
Update wasmfs.make to get WASMFS building again, but changes made to OPFS-over-WASMFS since we last tested it have made it incompatible with how we used it. It can now only be used from worker threads, eliminating the one benefit it had over the sqlite3_vfs OPFS implementation. Remove/amend references to WASMFS in the docs and remove all WASMFS-specific test app links from index.html.
FossilOrigin-Name: 32dc98c8001387b1970623192ec6cb89445000fa49bda5f4bd7c525bbe20bb5b
|
2022-12-17 11:14:35 +00:00 |
|
stephan
|
e9f740e484
|
Expose a JS-friendly subset of sqlite3_config() to JS, with the notable caveats that (1) setting up the JS bindings requires starting the library, making sqlite3_config() illegal to call and (2) calling sqlite3_shutdown() in order to make it legal to call sqlite3_config() may undo certain JS-side library initialization. Move sqlite3_(de)serialize() into the int64-mode-only bindings because of their int64 args.
FossilOrigin-Name: 62e0c931ac952219f68e22d64e20836781bf330b4581e4662266172a97c9289b
|
2022-12-16 13:04:21 +00:00 |
|
stephan
|
7c1c5b6232
|
Add a test confirming that exceptions are not passed through C-space if a JS-side sqlite3_set_authorizer() callback throws.
FossilOrigin-Name: 5a77c2c7aaa556007274e1b85790934665c2c12661ca11d896eb7d09cd49ce72
|
2022-12-16 11:33:42 +00:00 |
|
stephan
|
d83ab0cf85
|
Add sqlite3_set_authorizer() support and related tests to JS.
FossilOrigin-Name: 551b848894c249cb3c9d237643d2ed53ffcb3b003d0cf3f797a535df1731ce39
|
2022-12-16 11:13:32 +00:00 |
|
stephan
|
a51e044a5b
|
Added a couple missing 'not part of the public API' tags on functions in sqlite3-wasm.c. No code changes.
FossilOrigin-Name: eb27feecea508f3491a09699f2339951facd2345d479cfd3020183dc2af703b2
|
2022-12-15 18:50:30 +00:00 |
|
stephan
|
73b471964b
|
Internal refactoring of how sqlite3.wasm.xWrap() handles JS-to-C function pointer conversions, to enable similar conversions to be added more easily.
FossilOrigin-Name: 10cfe3fae6f680d3ecc3b0afbbf628ce91e34e3757b19dd27c231f0daf44232a
|
2022-12-15 02:28:55 +00:00 |
|
stephan
|
d60061616f
|
Remove an unnecessary/obsolete Emscripten-specific export.
FossilOrigin-Name: fa278022afd6dd6e499d26f74a8359f3e9973e1680772059ce331b64e77ec582
|
2022-12-15 02:26:13 +00:00 |
|
stephan
|
1a1d8bbdc3
|
Rename the new peek/pokeF32() and peek/pokeF64() to peek/poke32f() and peek/poke64f() for consistency with related APIs and because they're easier on both the eyes and the fingers.
FossilOrigin-Name: cc86f03ed698a071cd02ef3dfaba69092226bff20c917d662f808061627ad285
|
2022-12-14 18:06:01 +00:00 |
|
stephan
|
e5e61d40e9
|
Slight reformulation of some test code to test multi-arg wasm.peek() call form.
FossilOrigin-Name: 349bb28f614bc210b3283ed1c1144c45fbc7d9e2ffc3dc6193ccb9932d347efb
|
2022-12-14 16:40:17 +00:00 |
|
stephan
|
8a5c032b07
|
Use the new peek/poke() variants throughout tester1.js.
FossilOrigin-Name: ef7b783552f7783a728837fcfc81e493b135a7aac59747397e7e3d28f4309f95
|
2022-12-14 14:40:36 +00:00 |
|
stephan
|
feb9123a8c
|
Add convenience variants of sqlite3.wasm.peek/poke() for each numeric type to help reduce errors related to typos in the final argument (type-name strings). If wasm.xWrap.FuncPtrAdapter is called as a function, instead of a constructor, it now behaves as if it were called as a constructor (previously it threw an exception).
FossilOrigin-Name: 14e3fc01b929fa3f9a2fdbd93deb4a8aad58c111d46369c772def0437152fa75
|
2022-12-14 14:28:54 +00:00 |
|
stephan
|
bca56f384f
|
Add a test to demonstrate/verify which object acts as "this" in a oo1.DB.exec() callback.
FossilOrigin-Name: 8fc4b3f10f61e965853a22bf7a64ad2511ef656d66658a7910bac35b0f9805ec
|
2022-12-14 08:12:01 +00:00 |
|
stephan
|
b943df9323
|
A micro-optimization in sqlite3.oo1.DB.exec(). Changed the rowMode option of that method to only accept $X instead of $X, @X, and :X, as the extra options are entirely superfluous and may lead to confusion.
FossilOrigin-Name: 82a6c7fdf59729c182545b15c084b136e34513f340e87a7b6e5aa199117357b0
|
2022-12-14 08:01:34 +00:00 |
|
stephan
|
3c9749ab74
|
Document the role of the sqlite3.client JS API property.
FossilOrigin-Name: 5f11f1c7d5f8b627acd2ace277521d39fe2ffb0ef1dfe532e65fb56ea3dfb4d8
|
2022-12-13 10:54:12 +00:00 |
|
stephan
|
30f50a2d34
|
Extend the sqlite3.wasm function pointer argument converter to be able to handle the "two-layered context" of sqlite3_create_collation() and friends and make use of FuncPtrAdapter to perform JS-to-WASM function conversion for them.
FossilOrigin-Name: 0a60b7215e433f8c50027c70731b11e58d74c90ec5903e66ae42f9c98e40b044
|
2022-12-13 08:25:28 +00:00 |
|
stephan
|
33ce0b3ff3
|
Revert part of [9386d6f63468] because the new automatic function pointer binding cannot properly track per-context function mappings when the context is more complex than a single context-type pointer. e.g. it is fine for sqlite3_trace_v2() but it breaks down with sqlite3_create_collation() because that one needs to use the collation name as part of the context key and we cannot sensibly do so with the current code.
FossilOrigin-Name: 6cd21b79075367227b57bccf829cc7d4ccc7d7fbcfaed226b4c8e942ddae4eb6
|
2022-12-12 18:42:39 +00:00 |
|
stephan
|
124fc52d96
|
Move JS-to-C binding signatures from sqlite3-api-prologue.js to sqlite3-api-glue.js to allow for use of the new/experimental sqlite3.wasm.xWrap() feature which automatically binds JS functions to WASM/C as needed, which simplifies creation of bindings which take C function pointers. Reimplement sqlite3_exec(), sqlite3_create_collation(), sqlite3_progress_handler() to use this new feature.
FossilOrigin-Name: 9386d6f634680b4e0fa5487c34c63acb29f0b7a6ae738b8f6164ad084a229b62
|
2022-12-12 14:31:38 +00:00 |
|
stephan
|
5dbfc0dfdd
|
ext/wasm/module-symbols.html: for C APIs which have extended JS-side semantics, link to the JS-side API docs instead of the C docs.
FossilOrigin-Name: d557015208f504c6d5d20ebf1e451b3f07b19590d76371b16a9f4b54e9645282
|
2022-12-12 11:38:22 +00:00 |
|
stephan
|
13e5512b28
|
ext/wasm/module-symbols.html: add a hyperlink to the API docs for each exported sqlite3_...() function.
FossilOrigin-Name: 01d3a9bba3120cfec3f752048281f18ce7ab48fa7584750c097233a9ce095a20
|
2022-12-12 11:22:05 +00:00 |
|
stephan
|
b2eb8a5352
|
Rework the internals of how argument/result types are converted to/from wasm in prep for attempting to support automated conversions of function pointer argument types.
FossilOrigin-Name: 58052d8285cbc2aa8c4f8a9f5c2d33ac12014f6a70afbc93bc4ce5b9fd1f9ee5
|
2022-12-12 08:16:47 +00:00 |
|
stephan
|
81aca2574a
|
Add sqlite3.mjs to the new 'quick' wasm build for the sake of the snapshot build.
FossilOrigin-Name: 5a3f2224c37c7e28ce627bd98a9907a16635bffeea36e8ead707586aad37ccfe
|
2022-12-12 07:52:22 +00:00 |
|
stephan
|
fda3c30b7d
|
Expose sqlite3_txn_state() to wasm.
FossilOrigin-Name: f6f3397a4667b15a96bdf4189c54789d622fd90351405e963d7f56ac93a9344c
|
2022-12-12 07:31:37 +00:00 |
|
stephan
|
9bda4c53c1
|
Expose a number of infrequently-used sqlite3_...() functions to wasm whose absences were noticed while documenting.
FossilOrigin-Name: 3144e7c0b8633d99daa07d75dabfe6e115ad401110f6f3c85f768e973299f3d9
|
2022-12-12 07:27:22 +00:00 |
|
stephan
|
56bc31588e
|
Minor build tweaks in ext/wasm to create a faster-running build for the common dev-mode cases. No code changes.
FossilOrigin-Name: 6a61b14a6cf8279a5b8b77f934c2b97965f5e3fe4cddb03e78c2c0a840dbe6f6
|
2022-12-11 07:53:03 +00:00 |
|
stephan
|
e8bbf12ad3
|
Remove -flto from wasm build flags, as it increases build time and doesn't seem to have a measurable benefit.
FossilOrigin-Name: 35a88747eb0bb9eebb60550f91d0fe0c7a5ae11ec0a1315ae056fd79e9436a3f
|
2022-12-10 17:45:40 +00:00 |
|
stephan
|
130cd85026
|
Correct wasm heap corruption introduced in test code added in [e144fd5c88fa4] which led to unpredictable failures.
FossilOrigin-Name: 6c1e07e3857b38e394853891a9028e88319bad4bc7b7b15078e25f430c3b1222
|
2022-12-10 17:20:29 +00:00 |
|
stephan
|
8c0041f5bf
|
Remove two incorrect calls to structType.dipose() which prematurely freed objects in use by the virtual table test/demo code.
FossilOrigin-Name: 060eb2848975a24ff6683a8a9c4d7546ae36147323b0edae01fb42f52d9bb2d6
|
2022-12-10 15:41:47 +00:00 |
|
stephan
|
9cb6ff2792
|
Expose sqlite3_column_value() to WASM and add sqlite3_column_js().
FossilOrigin-Name: 7783aa4af1331190fd1f42a71bb724041e2e82b51745f9740926e4ead83a97ed
|
2022-12-10 15:13:29 +00:00 |
|
stephan
|
5c99d91e53
|
Refactor the internal JS routines for converting UDF results and errors to JS into public APIs.
FossilOrigin-Name: 35d1d63c7d60119b64341c561294890812837d5432d1d7bed3ed88d6212fbfa0
|
2022-12-10 10:24:46 +00:00 |
|
stephan
|
8ccef8f27f
|
Export sqlite3_result_subtype() and sqlite3_value_dup/free/subtype() to WASM.
FossilOrigin-Name: 4600a7bbdc4cbe14591d48ea19fe5f7de3a0c10a14cdd97fd51e263a13163d10
|
2022-12-09 15:26:58 +00:00 |
|
stephan
|
706780fbd9
|
Expose sqlite3_value_frombind/nochange/numeric_type() to WASM. Add a flag to sqlite3_value_to_js() to cause it to return undefined, instead of throwing, if no conversion can be found.
FossilOrigin-Name: de8fc4bf34f80f320012a0e506ed8e3e24806daf67845d5dabb00b916108f6ef
|
2022-12-09 15:12:07 +00:00 |
|
stephan
|
99f30f1cd4
|
Refactor the sqlite3_value-to-JS conversion from an internal detail to sqlite3.capi.sqlite3_value_to_js() for use with routines like sqlite3_module::xFilter().
FossilOrigin-Name: f6dbf280f99809a80c99337e4c22a86dea7a35ae41ae9a69144c4502385a0a1f
|
2022-12-09 14:46:24 +00:00 |
|
stephan
|
3ec44736b5
|
Remove some unused sqlite3_status() codes from the JS API. Add custom JS 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
|
2022-12-09 12:12:49 +00:00 |
|
stephan
|
81a3683174
|
Rename the oft-used, verbose sqlite3.wasm.get/setMemValue() and 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
|
2022-12-09 09:23:27 +00:00 |
|
stephan
|
5a83f52f48
|
Micro-optimization in the oft-activated JS-to-WASM arguments conversion step.
FossilOrigin-Name: ee47e9b83ca668b37dc1d8e519048a635693cf33d9967a2d81ff0824b7eea4ba
|
2022-12-09 08:44:22 +00:00 |
|
stephan
|
a3451dd990
|
Correct a test bug which broke the previous checkin's wasm tests in higher optimization levels. Test bug - it should not have worked in -O0 mode.
FossilOrigin-Name: f07141b7500c36169c2c96e045acf37ec97a0d75c0a5f4d0ebed4dc1d2094ccf
|
2022-12-09 07:17:54 +00:00 |
|
stephan
|
464c80d4c2
|
Export sqlite3_status() and sqlite3_stmt_status() to wasm. Expand the arg/return semantics of wasm.get/setPtrValue() and get/setMemValue() to simplify handling of multiple pointers.
FossilOrigin-Name: e144fd5c88fa4151429a2fef3daf389588402e158267f0afa0dfd142527d76b9
|
2022-12-09 05:47:42 +00:00 |
|
stephan
|
75f54dba50
|
JS API doc updates.
FossilOrigin-Name: 4f80fd3b8d4c85894664093d8310d6f5299faac4eb879edc608b3ffcd8558e9a
|
2022-12-09 02:23:15 +00:00 |
|
stephan
|
735dd03377
|
Expose sqlite3_table_column_metadata() to wasm.
FossilOrigin-Name: c31eb509e5cb1025de058132ee9a45d70c84ee47a6abe18811a65ce339f062a0
|
2022-12-09 02:12:43 +00:00 |
|
stephan
|
6ca03e14e9
|
Expose sqlite3_db_status() and sqlite3_db_config() to wasm, noting that the latter requires several internal wrappers to account for the various varidic forms (C varargs cannot be bound to wasm).
FossilOrigin-Name: d5753668915c1db204fa80153614653243081ffaddea22f26ad59bb1836948b9
|
2022-12-09 01:49:17 +00:00 |
|
stephan
|
d27c3e4e7e
|
Reorganization and renaming in the new VFS/vtab JS pieces.
FossilOrigin-Name: 1c2dda177a11fcc5b66e5554507c23ba4b9948a710b3bccfb26963b9851d40a4
|
2022-12-09 00:50:39 +00:00 |
|
stephan
|
1a9a29815a
|
Further docs and minor cleanups in the JS virtual table helper.
FossilOrigin-Name: c31e7488ac1a6b957782b72bd026b1f0590637b631e44a1fdf1dedeb5c587819
|
2022-12-08 18:18:37 +00:00 |
|
stephan
|
500fa7d518
|
Ease-of-use/legibility improvements in the virtual table JS helpers.
FossilOrigin-Name: 54c7ad7e08bdb87579398ade366605bfa2e2538a94aabcc6e4cda8e173649760
|
2022-12-08 17:07:27 +00:00 |
|
stephan
|
16bf97b507
|
More work on the JS vtable tests.
FossilOrigin-Name: 51e3c3b569dce2097063d39dc484f44b2f98cad0a902ef66765ca4cdc3e06f47
|
2022-12-08 10:06:07 +00:00 |
|
stephan
|
d061f14466
|
Got JS non-eponymous vtable working thanks to a hint from Dan.
FossilOrigin-Name: 750719b4981df62fa2ff3665e6f559ec760609ad2493495628295ad9ae6024fc
|
2022-12-08 09:06:20 +00:00 |
|
stephan
|
ab8b22a03d
|
Remove some dead JS code and tweak some docs.
FossilOrigin-Name: 0ee495452c014680697aa9035c245024df127a52d1820ab0e02580a015d96ecb
|
2022-12-08 04:19:38 +00:00 |
|
stephan
|
1eb1b59b89
|
Work on an alternate (slightly simpler) approach to binding JS vtabs. Non-eponymous vtabs are not working, for reasons as yet unknown.
FossilOrigin-Name: 6a0fefb93bcccd950df211cf5c2f49660c7b92115dd01b2b508a4ab9e3ab3d23
|
2022-12-07 07:22:34 +00:00 |
|
stephan
|
30da58c5d6
|
Add addOnDispose() method to Jaccwabyt and code-adjacent minor internal cleanups.
FossilOrigin-Name: 6a2723fe3f28dd94328d901e64e1e9ee9a1b2e9eeaed6c54038a5b83c914db78
|
2022-12-07 03:42:39 +00:00 |
|
stephan
|
241cde98b8
|
JS vtables: add infrastructure related to accessing and modifying sqlite3_index_info.
FossilOrigin-Name: 0d77c348039926c24e0fb50a7dc7e4b62895cd201c021f8e29832917e4b8b09f
|
2022-12-06 11:21:46 +00:00 |
|
stephan
|
d254db53e5
|
Remove deprecated symbol sqlite3.opfs.OpfsDb, which was renamed to sqlite3.oo1.OpfsDb on 2022-11-29.
FossilOrigin-Name: 0ce51bed65d5e430364f74bf959fb76c42ac5eec0769490231d8c8110a1f388c
|
2022-12-06 09:49:04 +00:00 |
|
stephan
|
75435f8b2d
|
Rename wasm.cstringToJs() to wasm.cstrToJs() for consistency with other wasm.cstr... APIs.
FossilOrigin-Name: cbf483ea0ba3e6dc08ad7ed654380f818544b4c3cedfdb8aa848a83298268ceb
|
2022-12-06 08:46:39 +00:00 |
|
stephan
|
671386c637
|
Add wasm.cArgvToJs() to support sqlite3_module::xConnect().
FossilOrigin-Name: c3ebdccf94d5e63c229bf91056c08052d78732e663334070ef3b0ef6fb4bfb8f
|
2022-12-06 08:39:17 +00:00 |
|
stephan
|
b849832a79
|
Minor internal JS code/docs cleanups.
FossilOrigin-Name: 21331bdd36a91b07a687ffadce392dcf2ccd0fd824b35d9dd027d4289a40fc96
|
2022-12-06 08:21:23 +00:00 |
|
stephan
|
2a665edbd4
|
Minor test tweaks.
FossilOrigin-Name: f902f3b2c79d6c699ead1efeb1426e1e0f4ac709afdff88be1de62f34f3d5ccc
|
2022-12-06 06:16:11 +00:00 |
|
stephan
|
6b271abc98
|
Add a demonstration sqlite3_vtab/module implemented in JS, based on ext/misc/templatevtab.c. Add oo1.selectArrays() and selectObjects().
FossilOrigin-Name: 60482c97e02bc4cafefef281be0cf0bc8c5c53232162829c137f3f7a80cdc534
|
2022-12-06 06:09:03 +00:00 |
|
stephan
|
2582d418d3
|
Remove two features of jaccwabyt which were fundamentally flawed, along with approx. 250 lines of unit tests which heavily relied on them. Thankfully, none of the sqlite3.js-level code used those bits.
FossilOrigin-Name: a190abc307847174f36421eaa3f47ef349c6f84a2bb35857fa64f64bbe722708
|
2022-12-05 15:05:46 +00:00 |
|
stephan
|
cfb66014bc
|
Jaccwabyt (JS) doc updates.
FossilOrigin-Name: a329a809b5da135a9c251e4d5f637d45d01d0248110ac05f2ad8f01d9df38c64
|
2022-12-05 14:32:35 +00:00 |
|
stephan
|
e1d25177c2
|
Expose sqlite3_get/set_auxdata() to wasm. Minor test app CSS tweaks.
FossilOrigin-Name: 44659ad32a9fe6363badfc5dbb0bd51d6fb2ee1c8aa47b71e9cf3dbd631fde9e
|
2022-12-05 14:13:55 +00:00 |
|
stephan
|
e0818715b7
|
Export collation-related APIs and strncmp()/strnicmp() to wasm.
FossilOrigin-Name: c3c56d9b944fd0d806d8dad9f0c7be3d7a5441765310908872cc525d82ab6a33
|
2022-12-05 13:33:42 +00:00 |
|
stephan
|
9a49a97487
|
Export sqlite3_vtab_collation() to wasm. Rename 'flexible-string' JS argument adapter to 'string:flexible' for consistency.
FossilOrigin-Name: 15f8042fddaeabab43dd187c463d3ccc56758cbf19bf2ca4837d9087a4850c1a
|
2022-12-05 13:12:48 +00:00 |
|
stephan
|
cf8f0d2046
|
Rename 'static-string' argument adapter to 'string:static'. Replace JS unit 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
|
2022-12-05 11:54:13 +00:00 |
|
stephan
|
0adef09374
|
Export sqlite3_bind/value/result_pointer() to wasm. Add 'static-string' 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
|
2022-12-05 11:30:39 +00:00 |
|
stephan
|
08fc64ea04
|
More work on the JS side of the virtual table APIs.
FossilOrigin-Name: cb9881ec001b0e2faf047e57acfd1722d2b546255a54e0f850f568edfe2df1cd
|
2022-12-05 07:51:25 +00:00 |
|
stephan
|
864c3c029b
|
Remove some dead code. Improve some error checks and comments.
FossilOrigin-Name: 6712fbe46a97867cea309f78a274edbb6bd166a505b41e18a580306da0e063db
|
2022-12-05 05:45:00 +00:00 |
|
stephan
|
e177447972
|
Initial infrastructure for adding virtual table/table-valued function support to WASM.
FossilOrigin-Name: c202d7a0398b9aabc2babba5c4c91a313f32bbf37549d419775642bb4aa3936a
|
2022-12-05 05:30:03 +00:00 |
|
stephan
|
a81c5b3a88
|
Export sqlite3_result_zeroblob/zeroblob64() to wasm.
FossilOrigin-Name: a60e56627fc0ef8831429941d429ee02c6ee51ce5a2c1af581dc5bc5a00d911e
|
2022-12-04 08:16:33 +00:00 |
|
stephan
|
9baafdabf7
|
Correct a memory leak in tester1.js.
FossilOrigin-Name: e42b052dd754e577b8429e2430821c5f88096170ffa58b4e5e3cb7ee19b6c37d
|
2022-12-03 15:41:29 +00:00 |
|
stephan
|
cbcc08ddc4
|
sqlite3.wasm.allocFromTypedArray() now optionally accepts an ArrayBuffer as its argument.
FossilOrigin-Name: 75a1a796f86d289c7275666fab19013934775dcccaed44a1a61d1749a6cb99c9
|
2022-12-03 14:58:45 +00:00 |
|
stephan
|
09c27a59db
|
Rename wasm.xWrap.resultAdapter() X:free entries to X:dealloc for 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
|
2022-12-03 13:10:58 +00:00 |
|
stephan
|
85ef4e4344
|
JavaScript: add sqlite3.wasm.realloc(), sqlite3.capi.SQLITE_MAX_ALLOCATION_SIZE, and related tests.
FossilOrigin-Name: eeb84ba5de1152ef0f42105b8b285fdee9f5ad58281e60a4e0c8b1d6de1dead8
|
2022-12-03 11:16:55 +00:00 |
|
stephan
|
2564ca7d15
|
wasm build: rename the path to the wasm docs checkout, for clarity and consistency.
FossilOrigin-Name: b820db32365b2ca8e2397fd6ea85883e4555ffd82948e248a0f98415b7328349
|
2022-12-03 03:06:16 +00:00 |
|
stephan
|
1369d6be02
|
wasm snapshot and doc-related build automation tweaks.
FossilOrigin-Name: 13eb1abd06f55fb88fc7f7be6149fd94b12057d9c38cc6b97bec3940e7e01f04
|
2022-12-03 02:42:21 +00:00 |
|
stephan
|
a37fed0f62
|
Rework the oo1.DB's distinct-per-VFS post-open() step to accept either a batch of SQL or a callback function. Increase OPFS's busy timeout to 10s.
FossilOrigin-Name: 9feefe253ac487cb52be6bdf91bdd305963266716baa08f2bf9505954ee76321
|
2022-12-03 01:59:03 +00:00 |
|
stephan
|
bb4e4a4840
|
Minor internal tweaks to the OPFS VFS. Resolve a missing result code which lead to a null deref in xFileSize().
FossilOrigin-Name: 57dd593ef0efa17dfb3a9f4eac36d5b8b879e271de817d8cd94a8c8b56d31870
|
2022-12-02 18:56:37 +00:00 |
|
stephan
|
95bc4d67bb
|
OPFS VFS: translate createSyncAccessHandle() exceptions which appear to be locking violations to SQLITE_BUSY. This seems to improve concurrency considerably even with a reduced retry count of 5 (was 6).
FossilOrigin-Name: 0d36021d107d3afca190ad61c3380536ad0cc2d493d345d48f9f9c1191741128
|
2022-12-02 18:06:26 +00:00 |
|
stephan
|
80ea1f406a
|
Minor touchups to the JS test index page and test server push rules.
FossilOrigin-Name: 0881f3e92364b3dc81443220451e853c0763efaf97653a6348bc39bd9bdb23ad
|
2022-12-02 11:35:21 +00:00 |
|
stephan
|
5ad4e89659
|
wasm builds: explicitly set a default stack size because emsdk 3.1.27 reduced it from 4MB to only 64kb, leading to memory corruption when kvvfs is used (it requires at least twice that for I/O).
FossilOrigin-Name: 758112460fb624198a144ed7d8d2324497fa72a2eee80010bd22b621e064b389
|
2022-12-02 10:43:14 +00:00 |
|
stephan
|
d09414e623
|
wasm: after building snapshot zip file, emit instructions for pushing it to the test server.
FossilOrigin-Name: 9615c77919fee60d708d72729c741b373a89900aabc318e0ceb4154638cdf339
|
2022-12-02 09:23:38 +00:00 |
|
stephan
|
1078ee0959
|
Correct the problem which triggered the rollback in [7eec635562f6]: an incorrect default db page size (not a multiple of 512 bytes).
FossilOrigin-Name: e06e490c240aa56b616e6f0380b5d08abf06f35f9e683e5150c5ac464eae9e55
|
2022-12-02 08:51:22 +00:00 |
|
stephan
|
20f0128acc
|
Roll back the SQLITE_DEFAULT_PAGE_SIZE part of [c260895faacb34] because kvvfs does not work at all with a page size of 8kb.
FossilOrigin-Name: 7eec635562f65592121d7ff0a31a7b4ff6cdfe38e657f326302ef851b3b37c3f
|
2022-12-02 08:38:04 +00:00 |
|
stephan
|
f3409db2d1
|
sqlite3-wasm.c: code legibility and coding style tweaks. Increase SQLITE_DEFAULT_PAGE_SIZE from 4k to 8k, as that improves OPFS speedtest1 performance by roughly 12%.
FossilOrigin-Name: c260895faacb3458c557778630756d02a8520c0f1864bddcf86cdd27ef4a42bd
|
2022-12-02 08:29:03 +00:00 |
|
stephan
|
cc70dfe679
|
Expand JS tests for db export/import and document reason it cannot currently 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
|
2022-12-02 07:14:56 +00:00 |
|
stephan
|
31892c2820
|
Remove extraneous/unused sqlite3.oo1.version object. Add httpd makefile target.
FossilOrigin-Name: 8e4d30ac033a6d9019a7eeedfe788dc0120f565cef2ae8f09d2bf32eb94d8a33
|
2022-12-02 03:37:49 +00:00 |
|
stephan
|
919dbc846a
|
sqlite3_js_create_file() now accepts an ArrayBuffer data source. Add test for OPFS-based export/re-import. The (sqlite3*) argument converter now optionally accepts sqlite3.oo1.DB instances.
FossilOrigin-Name: 14a84b67fb17e16a5691ea4bf7f374123ac73a361a5d3d0efca53788d2001e3a
|
2022-12-01 15:22:03 +00:00 |
|
stephan
|
9ec1a7a7a0
|
Reformulate and simplify some JS tests related to the previous checkin.
FossilOrigin-Name: 9ea2d3dcf798393a7fd231e199c0e2c6302949fe2a7f2573178fb0e50c78a2f4
|
2022-12-01 04:45:51 +00:00 |
|
stephan
|
2b2199570d
|
Expand "sqlite3_vfs*" JS-to-WASM function argument conversions to accept VFS 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
|
2022-12-01 03:55:28 +00:00 |
|
stephan
|
ec192e0659
|
Rename some JS files from X.js to X.c-pp.js to keep the maintainer, and downstream build customizers, aware that those files contain constructs specific to the c-pp preprocessor and will not run as-is in JS.
FossilOrigin-Name: 2eade7c7b17a186735c72974c11a34798a08364861d0f307e897ba765c0a93c7
|
2022-11-30 18:21:01 +00:00 |
|
stephan
|
8ae9545577
|
Install sqlite3_malloc/sqlite3_free() as the JS-side WASM allocator (as 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
|
2022-11-30 11:50:16 +00:00 |
|
stephan
|
c5141c9efa
|
Simplify how the OPFS VFS async proxy copies initial state sent to it from the synchronous side of the connection. Make the lock-wait time a multiple of the wait-loop timeout interval.
FossilOrigin-Name: eddafafffa634a42ceeed70aa3fc58be130527612157a4bf4ff9e65c7f6dc26c
|
2022-11-30 08:37:17 +00:00 |
|
stephan
|
e7f5118bd3
|
OPFS VFS: remove an invalid TODO and fix a property name typo which caused xCheckReservedLock() to always report false.
FossilOrigin-Name: 3b037caa2fa07b6c44c485574e9e5dc71f4a8e82bc902c1321bb0b918b139c74
|
2022-11-30 07:48:35 +00:00 |
|
stephan
|
36a0163e40
|
Rename some OPFS JS files. Prevent JS bindings of sqlite3_uri_...() from performing JS-to-C-string argument conversion on their first argument, as doing so is specifically illegal.
FossilOrigin-Name: 79832808de2cbdba140ed9e0558f1502b51d131ab4315265315922cda7b748cb
|
2022-11-30 07:17:29 +00:00 |
|
stephan
|
ad4f782815
|
Refactor a significant chunk of the OPFS sqlite3_vfs init code into 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
|
2022-11-30 05:27:36 +00:00 |
|
stephan
|
d0945f4638
|
Doc and logging text tweaks in the OPFS async proxy and test app.
FossilOrigin-Name: 7ce8608e221924d2c7067687eb6eef0f3cab181d5b4132e55a67d8514b6ce94b
|
2022-11-30 03:08:50 +00:00 |
|
stephan
|
72ee096775
|
sqlite3.oo1.OpfsDb: default to journal_mode=persist, as current tests show it to be marginally faster than truncate/delete in Chrome v109. Also increase default busy_timeout from 2 seconds to 3, admittedly on a whim.
FossilOrigin-Name: d0c8fa30a31c691bc1be5e98d806eeb1e23a8fc6cd54d87e5c1b720aa936e707
|
2022-11-29 18:28:40 +00:00 |
|
stephan
|
6e86d5569d
|
OPFS speedtest1: hide a currently-broken/to-fix WASMFS-build link.
FossilOrigin-Name: cde95d382f8debcbca27c4aaf08470ffda35ab10d723a887786669367590ad3c
|
2022-11-29 18:00:01 +00:00 |
|
stephan
|
a302e68476
|
Rename one instance of opfs.OpfsDb to oo1.OpfsDb, as per [0c5c51f4fb04].
FossilOrigin-Name: 75b04c9b302ec66749d8f072a49e61de9640b868bec99eadeb5b4bdef354c336
|
2022-11-29 06:56:09 +00:00 |
|
stephan
|
ceedef888f
|
Minor internal cleanups and docs in the OPFS sqlite3_vfs.
FossilOrigin-Name: 61799b05ff232c2ac349169c27bfe7f8d9277366093b0c9dd2739828993b3066
|
2022-11-29 06:09:32 +00:00 |
|
stephan
|
04184761de
|
Internal restructuring of the OPFS sqlite3_vfs in order to facilitate certain experimentation and improve error reporting/hints if it cannot be activated. Deprecate the name sqlite3.opfs.OpfsDb, preferring sqlite3.oo1.OpfsDb for consistency with JsStorageDb and any future DB subclasses.
FossilOrigin-Name: 0c5c51f4fb04a4b90c50ec9704cfea9a3fb7d7d0ee55c1b0d4476129188217a6
|
2022-11-29 05:25:08 +00:00 |
|
stephan
|
e6b0154138
|
Add an explicit warning about the current API-instability of the sqlite3.opfs namespace, which may need to be eliminated based on re-thinking of how the OPFS sqlite3_vfs is registered. Comment changes only - no code.
FossilOrigin-Name: 0cb2fd14179397051a25d066256a553fc198656d5668c7010c016f2b8f495bf4
|
2022-11-29 02:23:12 +00:00 |
|
stephan
|
ca9309cc56
|
Document an OPFS API change in Chrome v108 which does not break our code but does change several formerly async methods to synchronous. No code changes.
FossilOrigin-Name: e9dd87e28a96eb6560943b9a2cb3cb0ff14698c96fe63865944dcfed73b67bd3
|
2022-11-27 00:57:56 +00:00 |
|
stephan
|
4245667e35
|
OPFS VFS: add the opfs-unlock-asap=1 URI flag which tells the VFS to release implicit locks ASAP instead of during VFS idle time. This improves concurrency notably in the test app but brings a significant performance penalty in speedtest1 (roughly 4x slowdown). This is not the final word in OPFS concurrency, but gets us a step further.
FossilOrigin-Name: 9542f9ce9e023b489e2d93661f719fb0751c1e28f72fded9d3c2156d5777e7b1
|
2022-11-26 15:24:58 +00:00 |
|
stephan
|
df5d06d03e
|
More work on the OPFS concurrency testing app.
FossilOrigin-Name: c0458caca3508d5d252f9b5198bda4f51a5c1874540f014b17e409f2daab1706
|
2022-11-24 17:53:09 +00:00 |
|
stephan
|
6b86b33793
|
JS documentation cleanups. No code changes.
FossilOrigin-Name: 18e89a436daa18a8c972caf06b298da43c97a6ea3e2e5229dccb6920c27bfdb9
|
2022-11-24 16:03:49 +00:00 |
|
stephan
|
f46091d73f
|
Add sqlite3.oo1.DB.prototype.checkRc() and tests for both that method and its class-level counterpart.
FossilOrigin-Name: f7eaa6ba2147bfd6dbdc2444d0f919d846aa7f9b68cccab17ef585ffdacf3d60
|
2022-11-24 02:35:03 +00:00 |
|
stephan
|
f1ce4f40c7
|
Minor JS doc updates.
FossilOrigin-Name: 27efd63ad7fb3bf8d0d07f2c9f48652c8cacc4e697c229c8085120a8e6b50a39
|
2022-11-23 21:09:51 +00:00 |
|
stephan
|
875db41afc
|
Add optional zSchema argument to sqlite3_js_db_export().
FossilOrigin-Name: 9c23644b1e5bf44bfb431a35fd1674c11ccb99e9eb0989f10175b0cb2a858eaa
|
2022-11-23 21:03:22 +00:00 |
|
stephan
|
056a71562f
|
OPFS concurrency test: add a URL flag to enable/disable unlock-asap mode.
FossilOrigin-Name: 1c1bf22eadae2a5a7d4358e7cdd22641c2efb9296f42e7376749293b3a58b114
|
2022-11-23 20:49:08 +00:00 |
|
stephan
|
e79cb67c35
|
Add an experimental OPFS VFS-specific URI flag, opfs-unlock-asap, which tells the VFS to release implicit locks ASAP. This permits higher concurrency but hurts performance considerably. This may or may not be obsoleted by other concurrency-related experimentation.
FossilOrigin-Name: d23c917013485ec2793125221f3936b05c39d6eca941629fb819b6b4aa714520
|
2022-11-23 19:03:22 +00:00 |
|
stephan
|
ad1285c5c0
|
Initial infrastructure for adding a mode to the OPFS VFS which causes implicit locks to be released ASAP, which increases concurrency at the cost of performance.
FossilOrigin-Name: c5b7a9715a13b696ab3ee965aa0a310f59b65f07cecd72faa2e3504bfd8eb632
|
2022-11-23 16:39:07 +00:00 |
|
stephan
|
91a81316b9
|
Remove a bit of over-cleverness which breaks loading of sqlite3.js in some main-thread cases.
FossilOrigin-Name: 220cc4c6399b772b4ece03305a41b437ef0654d586a8a1c3dc5e7606fd36d655
|
2022-11-23 15:52:52 +00:00 |
|
stephan
|
3eaaec945c
|
OPFS concurrency tester: ensure that the work interval timer does not overlap with the work time.
FossilOrigin-Name: 8f2076553bc486ea6a17934695ecc02217461af2082d891697b62aab89bd1b43
|
2022-11-23 15:33:49 +00:00 |
|
stephan
|
9f2be5db04
|
OPFS contention test: give each worker a distinct recognizable name instead of a random one.
FossilOrigin-Name: 5f564bf7de7ce3ad7bedb5f06b3086ceaec55da768a60d74059fa4fba4328567
|
2022-11-21 16:00:26 +00:00 |
|
stephan
|
a303392a2c
|
Add new JS tests dir to those pushed to the test server.
FossilOrigin-Name: 07182dca9f2a4ffea1af0684c93e55e105465b2ee9820c70764e3e7bc1c28efc
|
2022-11-21 06:07:22 +00:00 |
|
stephan
|
b38ac0986e
|
More tweaking of OPFS concurrency measures and the related test app.
FossilOrigin-Name: a8d4da1501d411085ec2fd48c4a056c8b1d97ef3c3203c5b403a854ac2864870
|
2022-11-21 05:18:24 +00:00 |
|
stephan
|
36d5554c9a
|
Resolve missing SQLITE_LOCKED result code which triggered a new (since last checkin) exception in the OPFS VFS. Improve output of the OPFS contention tester app.
FossilOrigin-Name: 2debbbca33bd4170a1dc4dbb5eb3e68523e51d289b06c551e5560ac4e32e433b
|
2022-11-21 04:12:38 +00:00 |
|
stephan
|
27c4cd183d
|
Add test app for experimenting with multi-worker OPFS concurrency. Tweak OPFS VFS to significantly improve the otherwise "unfortunate" concurrency situation.
FossilOrigin-Name: 96f76e7616f8157a342b9e1c42f7b1feab200d182268871a2b25f67d4ee2564c
|
2022-11-21 03:50:52 +00:00 |
|
stephan
|
ae276719f0
|
js dist: account for a file rename in the previous checkin.
FossilOrigin-Name: 469f9011a885e19b99210c5e3e582afa140b8b5f0aa7a720334848df5ab6ae98
|
2022-11-20 05:47:17 +00:00 |
|
stephan
|
6d97c1a844
|
Further minor cleanups in the JS build related to vanilla vs ESM.
FossilOrigin-Name: 100a596800eca61477d9880092465d594c22be3707f2a11aaf6eb9e234fc6f2d
|
2022-11-20 05:36:52 +00:00 |
|
stephan
|
59a9654715
|
Remove an obsolete reference to WASMFS from ext/wasm/index.html.
FossilOrigin-Name: 51ff681864ec19844f8e7a46aef132e8a8601a1b64e1f5a243a53c6413f2a61a
|
2022-11-20 04:14:29 +00:00 |
|
stephan
|
b2873a3014
|
Generic cleanups and doc additions in the wasm build files.
FossilOrigin-Name: d10f385e36ee7fe3077d80d8d6e7ce55732d20ef73e2a63533d8d2932ec8bf62
|
2022-11-20 04:14:00 +00:00 |
|
stephan
|
8e1bd8264d
|
Add 'snapshot' target to create distinctly-named snapshot builds of the wasm deliverables zip file.
FossilOrigin-Name: f7620aa09e4893971e00cdee5c6f1fe15c3bd21f985bec90fbd90fdfc457ac31
|
2022-11-20 04:13:16 +00:00 |
|
stephan
|
0a94ef8b52
|
Minor cleanups in the ESM-related preprocessor filtering.
FossilOrigin-Name: 205884a273128bb666b496b659b4fa9f031ebdbbc1aa704fdeb4b7e015740098
|
2022-11-20 01:15:22 +00:00 |
|
stephan
|
8d0d409876
|
Get tester1.js working via an ES6 worker module and add that variant to the dist zipfile.
FossilOrigin-Name: 90480586f1b2ad82118e19536b095431b8457f294c0afaa9b4f883f184cc804c
|
2022-11-19 16:16:40 +00:00 |
|
stephan
|
27a67968af
|
Add build of sqlite3.mjs (ES6 module), add a test app for it, and include it in the dist build.
FossilOrigin-Name: 2e783670e10b59e67c14b0db7f4803b41790cc7730de221d54fa2d4483cfba33
|
2022-11-19 05:26:45 +00:00 |
|
stephan
|
c768ef7289
|
Integrate a custom preprocessor to the JS build process to facilitate creation of both vanilla JS and ES6 Module builds from the same source files. There is still some build-level reworking pending to make an ESM build a first-class deliverable.
FossilOrigin-Name: 10c723d96d61d2e552ec1102563d58f1eb11bc3d30e03606fd8e0279c5a9043a
|
2022-11-19 02:58:03 +00:00 |
|
stephan
|
f7d98ac764
|
More work towards creation of a ES6 JS module.
FossilOrigin-Name: 6b826e700f6849eebfbba38e5948b96be245994e3e03ea30743114d3f5689c42
|
2022-11-19 02:51:41 +00:00 |
|
stephan
|
ee026c5479
|
Replace use of cpp with the fit-to-purpose c-pp to avoid cpp's C-centric/JS-unfriendly quirks.
FossilOrigin-Name: 49d70f071e918d5d095c807575bb7ce2b287a123261e789e938521b3b409429a
|
2022-11-18 02:29:59 +00:00 |
|
stephan
|
c7c15d1b83
|
Merge trunk into js-cpp branch.
FossilOrigin-Name: e047b33d1fb7d6a32e967f03f9952249cd2da4d21dc301fe92bd7baa0da5d6a9
|
2022-11-17 15:21:49 +00:00 |
|
stephan
|
a872466c8e
|
Change a self.X JS reference to X to account for a symbol resolution discrepancy between vanilla JS and ES6 modules, as explained in [forum:801d8f77e5115141|forum post 801d8f77e5115141].
FossilOrigin-Name: 0590de4da1103d842b9f9f25bcd2e69223b2ea067ae2f320f58dd3763218b39d
|
2022-11-16 21:52:29 +00:00 |
|
stephan
|
1d4f1cf426
|
wasm build: include FTS5 instead of FTS4, per /chat and HN discussions.
FossilOrigin-Name: 85c3f2ac5a887ba809f236c8c9d3837b2fdb578d4beae61bc78ada7ce03b58e2
|
2022-11-16 21:39:23 +00:00 |
|
stephan
|
8d7b41302f
|
Remove some outdated code comments. No code changes.
FossilOrigin-Name: 80ff592a9d0157bfa8bd1f9959c3aa26cab0ec16fdccf7b58a7523b8912c1a8c
|
2022-11-13 19:29:51 +00:00 |
|
stephan
|
da2641597a
|
Rework automatically acquired OPFS locks to be released during idle time. This eliminates the performance hit reported in [46304ba057707c].
FossilOrigin-Name: a7fe91afca473fe55c983bc81d214df4ef3699863c7423fa4b6b9cde23d6a3b4
|
2022-11-10 13:14:30 +00:00 |
|
stephan
|
aafa022f5b
|
OPFS: if an op which needs a lock is called when no lock has been obtained, automatically lock it at the start of the op and unlock it at the end of that op. This is an attempt to alleviate the cross-tab contention described in [forum post 58a377083cd24a|forum:58a377083cd24a] but it increases speedtest1 run time by approximately 4x. Perhaps auto-lock can be combined with the older idle-time-based auto-unlock to unlock such locks (but not those from xLock()) to improve this?
FossilOrigin-Name: 46304ba057707c3b072b6e7bb8c4af774f653aa5814099f0866cd87b2b73abeb
|
2022-11-10 11:35:10 +00:00 |
|
stephan
|
690d4c545d
|
Add sqlite3.wasm.alloc.impl() as a "public back door" into the low-level non-throwing allocator. Correct sqlite3.WasmAllocError constructor to behave like its usages expect it to and add tests for that.
FossilOrigin-Name: cea8bf9a144d842c4755c3130273524926e8c4831d7f21c4e34d4e8c74109c8c
|
2022-11-07 13:06:20 +00:00 |
|
stephan
|
c0a18d6a5a
|
Minor wasm doc touchups. No code changes.
FossilOrigin-Name: 2c448368913a844bdb5e69f8fa3bad91a2b6612ba3b7f3f650dd07b81db25a77
|
2022-11-07 12:12:27 +00:00 |
|
stephan
|
c75445087f
|
Correct sqlite3-wasm.c's SQLITE_DEFAULT_CACHE_SIZE (it's measured in kb, not bytes).
FossilOrigin-Name: 479ad980dfe509403e184e39a5aa441171e47b3297e05039f85516e72e9f15be
|
2022-11-04 09:02:21 +00:00 |
|
stephan
|
7d24ff2971
|
Add experimental esm target to ext/wasm/GNUmakefile to tell emcc to generate sqlite3.mjs (ES6 module) instead of sqlite3.js. Related to discussion at [forum:ed4596cf8496a39b].
FossilOrigin-Name: e55d8eba83012492d85418dc0faedce5896027ecc70295a5ca1826f61a5edbaf
|
2022-11-03 22:51:20 +00:00 |
|
stephan
|
b0ab21dee4
|
Experimentally use clang's C preprocessor to filter #ifdef's out of the generated sqlite3-api.js, the goal being to see if we can feasibly use cpp to include ES6 module-specific code in the main code base and conditionally filter it out.
FossilOrigin-Name: 718a6d371e61359d73c8f80afdb248e3d9b4d8df4c4e5c122ac884344e31035b
|
2022-11-03 22:14:47 +00:00 |
|
stephan
|
4df2ab575f
|
Globally replace '' with "" for empty JS strings to please C preprocessor.
FossilOrigin-Name: e92e1f42bef94a1df29f66b4111ebfde93eba3759bc5d5a9c95f714508851346
|
2022-11-03 21:21:10 +00:00 |
|
stephan
|
de6186e04f
|
Minor build cleanups and fix a harmless race condition in the OPFS part of tester1.js.
FossilOrigin-Name: 70ee6ee014bc4e2c1daa9b4a8909cf76ccecf32de1eb39055f20d3d0b1daa1bd
|
2022-11-02 14:08:59 +00:00 |
|
stephan
|
f45c33701d
|
Add sqlite3_wasm_vfs_create_file() to replace Emscripten's 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
|
2022-11-02 11:53:31 +00:00 |
|
stephan
|
c18c8bf957
|
Fix a symbol name typo which broke and exception-handling case in OPFS xOpen().
FossilOrigin-Name: 5bc83d569594e104e90b1acef1a5fd23655b2089de393a6776e799fdef2082f5
|
2022-11-02 08:49:05 +00:00 |
|
stephan
|
0f32760e3c
|
Minor internal cleanups in the js pieces.
FossilOrigin-Name: 271391b4e32220ab4c32d69f579ecd2b03eb99da898955a1ef8fffc27216719d
|
2022-11-01 11:09:34 +00:00 |
|
stephan
|
49048b148e
|
Significant cleanups and expansion of the sqlite3.opfs utilities. Add oo1.DB.dbVfsName(). Add VFS name to worker1:open's arguments and result.
FossilOrigin-Name: 86a341d7e061f946b39e8647ddd4743013b851b33ae9e6e755d8dbc53fba5286
|
2022-11-01 07:49:49 +00:00 |
|
stephan
|
02d15a7ebd
|
Worker1: use a list, rather than a single slot, to manage the default db link so that we can keep the least-recently-opened db as the default. Re-introduce worker1.export() but do not yet expose it until an equivalent import() (or open() option) is implemented.
FossilOrigin-Name: c7750c101d9b7baa31496731bc34ea0a9b2bad0c11e2b3e92a8c7b327135c1bb
|
2022-10-31 13:50:05 +00:00 |
|
stephan
|
43b442a626
|
Internal tweaks to the OPFS VFS result codes.
FossilOrigin-Name: 32e1a2d2eb8738ae1635e413829f6cf7f64c63d2a86b72940a573de89948e529
|
2022-10-31 11:53:34 +00:00 |
|
stephan
|
1acfe91582
|
Add oo1.DB.exec() 'returnValue' option, which specifies what exec() should 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
|
2022-10-31 11:09:14 +00:00 |
|
stephan
|
50ef01398d
|
Add oo1.DB.selectArray() and selectObject().
FossilOrigin-Name: 7660db2a2e9c4f3a6a9343d6929744ad0f4be6820976411f9080165491da59b7
|
2022-10-30 11:39:47 +00:00 |
|
stephan
|
9163ef1f4d
|
Adjust automatic OPFS locking retries such that they will wait up to a total of 3 seconds spanning 4 attempts.
FossilOrigin-Name: bbce49d81abc491ca666474040a53057e26e99131fea9449de253f88f4415ded
|
2022-10-30 10:24:53 +00:00 |
|
stephan
|
1fc6ffccc5
|
Minor WASM build cleanups. Enable custom Module.instantiateWasm() when not in WASMFS mode (where it doesn't work). Add sqlite3.debugModule URL param to enable some module-init-time debugging output.
FossilOrigin-Name: 50f678846a2b3c3d0818f0bae89f2ee86252a2e6a9c7029ebaae3953ca0fa14c
|
2022-10-30 09:47:33 +00:00 |
|
stephan
|
af9cee12c1
|
Reduce wasm module's starting memory from 128mb to 16mb. The latter value is needed only for WASMFS-based batch-runner.js, as WASMFS builds cannot be configured for dynamic memory growth without a tremendous performance hit.
FossilOrigin-Name: ed9d93c48752ba6e18edc1238a8ccdbf6bb65c74fb52a89d515f8b0ab6bea13a
|
2022-10-30 08:39:18 +00:00 |
|
stephan
|
1cc77c9543
|
Update ext/wasm/README.md for recent developments.
FossilOrigin-Name: c76ec31ebf4d80ec8cbd2aa2017e1d6bc32eae66bfbcc130c053ddb403599c6b
|
2022-10-29 12:31:50 +00:00 |
|
stephan
|
da27e4aa02
|
More styling of module-symbols.html.
FossilOrigin-Name: a36f42a8364b745c410a6f837d005a193f6a93134cac087ac18bee2897cad730
|
2022-10-29 10:14:56 +00:00 |
|
stephan
|
df52a0bc78
|
Expand and document the wasm doc-update make rules. Extend the dist rules to fail more readily if there's a problem.
FossilOrigin-Name: 362ec11ec09f441b745cbd8ac8366b6bc998aba6e2b70782a88f189a3ffa9923
|
2022-10-29 09:45:01 +00:00 |
|
stephan
|
8948fbee29
|
Move the sqlite3.capi.wasm namespace to sqlite3.wasm. This causes a tiny bit 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
|
2022-10-29 07:54:10 +00:00 |
|
stephan
|
ffbc653d85
|
Remove sqlite3_interrupt() from the WASM build, as it is essentially impossible to employ in JS's threading model.
FossilOrigin-Name: e85387590061edbb6cdc04de792ab86f43afaa5c8d1b0792206cb5b481c7d76a
|
2022-10-28 14:33:50 +00:00 |
|
stephan
|
f03ddcca32
|
Add ext/wasm/module-symbols.html. Adjacent minor JS touchups.
FossilOrigin-Name: 24f12e681e06e3b71a6ac9c82255fe0270953a74c711405841f7e385eeafe874
|
2022-10-28 11:40:46 +00:00 |
|
stephan
|
e681b651eb
|
Minor sqlite3.oo1 API reorg prompted by documenting.
FossilOrigin-Name: 55237924ca363c5a3e0f8c82620eb6626a98311615866197375a86876b9da3a1
|
2022-10-28 10:36:18 +00:00 |
|
stephan
|
674b312ed7
|
speedtest1.html: when vfs==kvvfs, increase --size from 2 to 4, as enabled by [a4d40f6346e7]. --size 5 is 4.96mb out of (supposedly) 5mb, which works but is a bit too close to the edge.
FossilOrigin-Name: a608d584a8a68ebaf8566cffc9c33f59309b710e7b29229a15bef529702f35d5
|
2022-10-27 14:41:38 +00:00 |
|
stephan
|
4f975c3379
|
Minor doc typo fixes.
FossilOrigin-Name: ed8d3f25a4d6ac04d9f7918c791d8d2c6f23ce846278ca63f8fbadb7ea27369f
|
2022-10-27 03:57:48 +00:00 |
|
stephan
|
de868175c3
|
Expose sqlite3_randomness() to WASM and add a custom binding for it which can populate a JS byte array. Add WhWasmUtil.isPtr().
FossilOrigin-Name: 333e67076b4bc967bb543ef8e265c63f6e3498c38ac121a7d1eff4a1d7a71c63
|
2022-10-27 03:03:16 +00:00 |
|
stephan
|
8c3e234ad5
|
Correct misuse of localhost-mode-only symbol S in fiddle-worker.js, which should fix the outage reported in [forum:67d985ac0bbe407f|forum post 67d985ac0bbe407f].
FossilOrigin-Name: 3b5aa50c223ac35c7d73e4629420a01408cd74d19ae5b887f91b7a657d91e026
|
2022-10-26 15:40:17 +00:00 |
|
stephan
|
7731dfca49
|
Corrected link to fiddle in ext/wasm/index.html (broken by [3d7b4f36b7dd]).
FossilOrigin-Name: 6efa0bae1678bf719a0693feeceb4c1e252fc86502bee9ee2a6d8af9a91d9b20
|
2022-10-26 15:34:51 +00:00 |
|
stephan
|
34b92b19f3
|
Replace the newly-removed oo1.DB.getFilename() with DB.dbFilename() with the hope that the distinction from the dbInstance.filename property is clearer.
FossilOrigin-Name: 0b80543d75504c733b73b32f73b96074a4b0cebad64e47032926a3fefee41726
|
2022-10-26 11:27:33 +00:00 |
|
stephan
|
14ae1a5331
|
Remove oo1.DB.hasFilename() and getFilename(), as they are unnecessary.
FossilOrigin-Name: 75c546b982024bf2b527c85271111d54158cb010867f6e29fc89e86cc8457cc5
|
2022-10-26 11:12:14 +00:00 |
|
stephan
|
419e0d3e09
|
Add --download-version flag to ext/wasm/version-info.c and correct dist target's output version format to match.
FossilOrigin-Name: 6f2a40d06dd9a56491d27928ed3785e08308c7dcea2b3f768097fc98ba91a910
|
2022-10-26 06:05:44 +00:00 |
|
stephan
|
e896ba94e3
|
Add doc page link to the wasm dist README.txt.
FossilOrigin-Name: c2380668d9a2ad04f6f27ef052190bda17cdb112895e93b94ae1da70db6983c8
|
2022-10-25 16:57:42 +00:00 |
|
stephan
|
ce2d4ae6a6
|
Rename fiddle.html to index.html and move fiddle push-to-server rules from GNUmakefile into fiddle.make.
FossilOrigin-Name: 3d7b4f36b7dd01058d57fc8ef7689d9bbf1a219166796ed427180cd59d2c189d
|
2022-10-25 15:59:27 +00:00 |
|
stephan
|
16603ecfcb
|
speedtest1: use the current (or default) vfs->xDelete method to unlink the db. This is specifically necessary when running the opfs vfs in a wasm build of speedtest1. This worked without this fix until recently because the affected test code was performing similar acrobatics in its stead.
FossilOrigin-Name: d3c830bd37a402161b486d3631feceae5d00f89c2522aed65fcd2e666bd64238
|
2022-10-25 15:38:38 +00:00 |
|
stephan
|
89954fe7ce
|
Minor doc tweaks in the JS GNUmakefile.
FossilOrigin-Name: 9c8df130b8137cb4705f805907d1ff754d7f4b07bf181e1d05f1798b7aa5f4f6
|
2022-10-25 08:41:00 +00:00 |
|
stephan
|
d3c8f2ac33
|
Remove persistence from the 'reverse log order?' checkbox in tester1.js to eliminate an inconsistency between the main-thread and worker-thread modes (the latter having no option for persistence of that setting).
FossilOrigin-Name: ecf906b07f50b4fcc551d20326a1bb1189bd6c2274627fd293f9460658ebea07
|
2022-10-25 08:15:57 +00:00 |
|
stephan
|
f861b36bf4
|
Minor cleanups and doc improvements in the OPFS sqlite3_vfs proxy.
FossilOrigin-Name: 48645f7bcacf81c4149f26d20ee1752fbe93a02f96b85bd7e28bfa49322137e5
|
2022-10-25 08:06:17 +00:00 |
|
stephan
|
3725af73b9
|
Add SQLITE_DQS to the compileoptions_used list, per request in [forum post 8b1060122b|forum:8b1060122b]. Force DQS=0 in sqlite3-wasm.c.
FossilOrigin-Name: fcd9e0dbe3226f3f7ccc15b11fc3aa3b8058571bef274c25a33e9753e22f7551
|
2022-10-21 17:48:49 +00:00 |
|
stephan
|
98147dd526
|
Add kvvfs tests to tester1.js. Fix a scopedAlloc() misuse in oo1.DB ctor caused by refactoring earlier this morning (and caught by these new tests).
FossilOrigin-Name: 8e0f001ab76de6dbc17295b9085f7f61ce274c43f8c432ea4d2ec3153d248ff3
|
2022-10-21 06:58:27 +00:00 |
|
stephan
|
848d27ada1
|
Add timing info and OPFS sanity tests to tester1.js
FossilOrigin-Name: 99915b0076422487cdd181a54e55694404fba13e4a540329b5ede9e2c9e12532
|
2022-10-21 06:26:17 +00:00 |
|
stephan
|
a6ca996e4a
|
Expose sqlite3_vfs_unregister() to WASM and unregister kvvfs in Worker 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
|
2022-10-21 05:27:40 +00:00 |
|
stephan
|
6f3286cafd
|
Make semantics for UDF xFinal() result handling and error reporting handling more flexible.
FossilOrigin-Name: 89f3e1982ec32c010af67d15ef780847df20de568669e5c9d02f3cf084f51330
|
2022-10-20 23:48:38 +00:00 |
|
stephan
|
96b6371d70
|
Add more JS tests. Flesh out the aggregate UDF tests to use 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
|
2022-10-20 21:28:31 +00:00 |
|
stephan
|
8a8244b5c1
|
Rename sqlite3_web_... to sqlite3_js_... Document the worker1.close.unlink option. Fix unlink usage in speedtest1.html. Minor JS build cleanups.
FossilOrigin-Name: ac9af71b72a749b0a040273a88480d56f49570b569389a4ea20cc055f494d8ff
|
2022-10-20 18:31:32 +00:00 |
|
stephan
|
842c5ee849
|
Rework sqlite3_wasm_vfs_unlink(), add sqlite3_wasm_db_vfs(), update some docs.
FossilOrigin-Name: cdd46858f0e63bc7bfce8e339b3db9efdec43b6443ee76563a847f53d0176831
|
2022-10-20 05:14:37 +00:00 |
|
stephan
|
d89a66ec36
|
Minor internal JS cleanups.
FossilOrigin-Name: 818ef0b5c909e733b643455278f7cc45533178f1cc6617058c00ed64fa44896a
|
2022-10-20 04:00:05 +00:00 |
|
stephan
|
a817b30f0b
|
Update the wasm/js 'push' rule to account for this morning's changes.
FossilOrigin-Name: c4a0f745fbaf6f950810f92765cbe66dde66e226b78ec5dd9017473bf4c9c268
|
2022-10-19 07:51:12 +00:00 |
|
stephan
|
fd31ae3bf9
|
Rename several demo/test files and include more of them in the end-user dist archive.
FossilOrigin-Name: 9c85835f6f50eb3b1a2b89c817816335743f04440c48bfa05aa89ec519cc0d51
|
2022-10-19 07:34:36 +00:00 |
|