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 |
|
stephan
|
9dc4d5e6b4
|
Minor wasm/js build tweaks.
FossilOrigin-Name: bcbee1ec010ae74f0749aa7fda008698198a8cd52a7aa12d6458d43d3e739eb0
|
2022-10-19 06:14:24 +00:00 |
|
stephan
|
3117dc60e3
|
Update the dist rules for this evening's js/wasm build changes and include an index.html specifically for the subset of apps included in the dist archive.
FossilOrigin-Name: a0ef0f32e96638b502b3951e524d590bdfb09dd39be453686b075102da67b7db
|
2022-10-19 06:06:42 +00:00 |
|
stephan
|
cd0df83c15
|
Apply considerable acrobatics to get the JS/WASM deliverables building to 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
|
2022-10-19 04:44:58 +00:00 |
|
stephan
|
71de8e0241
|
Considerable wasm/js build cleanups and reworking. Remove wasmfs builds from 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
|
2022-10-19 01:07:30 +00:00 |
|
stephan
|
b5e2e6fcd3
|
More work on the JS end-user deliverables. Add tool/stripccomments.c to support that.
FossilOrigin-Name: 2156f0744acfe425457430a0f6a7e02de907de85edba81a6d4eef40293e561c8
|
2022-10-18 20:36:50 +00:00 |
|
stephan
|
ce152a4369
|
Add ext/wasm/README-dist.txt, intended to have been in the previous checkin.
FossilOrigin-Name: c9080b6505b839cc0bb5bd25ce7df0daa91a0a303d037ffe6e77888c8584b932
|
2022-10-17 17:36:11 +00:00 |
|
stephan
|
e79a0943ed
|
Initial draft of archive generation for the wasm/js deliverables.
FossilOrigin-Name: f6cee114c71e11ca1f508c8f60be5753871cbd4fd6c45ce397824bddbf00ffd9
|
2022-10-17 17:34:41 +00:00 |
|
stephan
|
1b8c246799
|
Repair version-info.c after a local mishap caused all of the intended edits from [36e197cb3d0c]/[e9b407a4d0a0] to get deleted before checkin. Simplify version-info build (only requires sqlite3.h, not the library).
FossilOrigin-Name: 6e511df500c63e27f932be9d601b641144562614dead99371477eca4594fb3fd
|
2022-10-17 16:47:59 +00:00 |
|
stephan
|
cdc9ddc6ec
|
Missing file-rename for the previous checkin.
FossilOrigin-Name: e9b407a4d0a0fcd9f26d457beede19d41141327befe84be621681952be5d1e69
|
2022-10-17 15:53:16 +00:00 |
|
stephan
|
0467b01a1f
|
Rework ext/wasm/version-info.c to make it more useful for the upcoming dist build rules.
FossilOrigin-Name: 36e197cb3d0cbb76e4c1381d77f7d8856e7391f2ef6671c13b9b6b0133315814
|
2022-10-17 15:52:12 +00:00 |
|
stephan
|
e493f8f0cd
|
Typo fix.
FossilOrigin-Name: 650126c92aa191d6361a32ec90ca7def60a2df22ba6bec1d2354692fe3504423
|
2022-10-16 23:33:24 +00:00 |
|
stephan
|
2676fc58c8
|
Minor tweak to get bring an edge case of oo1.DB.createFunction() into aggreement with its docs.
FossilOrigin-Name: 8d59ccd9f357fbed0b0790508ca9027194fc4b0131029f9f460c7b4bde806a5f
|
2022-10-16 18:57:15 +00:00 |
|
stephan
|
824bb5b8db
|
Add aggregate function support to sqlite3.oo1.DB.createFunction(). Change signature of the options object used by that function so that the callback property names match those of the corresponding C APIs.
FossilOrigin-Name: a7db6e4b50beebfb1c97e0c4de49538d8199c166b18a0b1b175736c593128a00
|
2022-10-16 18:50:55 +00:00 |
|
stephan
|
8ffc98999d
|
JS: add build-time-generated version info to the sqlite3.version object. Remove some stray debug output from tester1.js.
FossilOrigin-Name: b5f462c2d85d503f6492ec20580d57cb4c926712f6306a6be764bd09d1f5e8b8
|
2022-10-16 16:38:15 +00:00 |
|
stephan
|
956392694a
|
Add a top-level license and build-time version info header to generated sqlite3*.js. Correct a broken link in ext/wasm/index.html.
FossilOrigin-Name: 0f1a06e8e39a1fbc74f1aff9cc59787282dfbf847d6c5c7edb3f7d410db0e4b7
|
2022-10-16 15:38:03 +00:00 |
|
stephan
|
e72ddfd89b
|
Generic minor cleanups and docs in the OPFS async proxy.
FossilOrigin-Name: a4423ca234453c14eb40db7fe5943f63b30fd9dc2207388e8a2966733a004e9d
|
2022-10-14 15:52:29 +00:00 |
|
stephan
|
3e771c0f07
|
Remove a resolved TODO comment.
FossilOrigin-Name: 32fd4ac382f774189ac34f6fff80e55e6e56dd2aa67b0db88d5a88324f17f6ff
|
2022-10-14 13:26:18 +00:00 |
|
stephan
|
d92c652ac1
|
Move the rest of testing1.js into tester1.js and eliminate the dependency on jaccwabyt_test.c. Extend the list of default config-related #defines in sqlite3-wasm.c and reorganize them for maintainability.
FossilOrigin-Name: 4e2a8aff2dd4b6e148f45184e2523ebe47815257eca97fa3d32bcbf9625f0def
|
2022-10-13 16:48:35 +00:00 |
|
stephan
|
d85d08398d
|
Port the first 180-odd unit tests from testing1.* into the new tester1.*. Fix a stray-keystroke-induced typo which broke pstack.allocChunks().
FossilOrigin-Name: ef689e33e464829f5cbe4ca24a53d9dba59abe74d3d80a37a91b93a4eccccf2d
|
2022-10-13 08:03:31 +00:00 |
|
stephan
|
402da26c16
|
Add initial infrastructure for setting up function/regression tests for the JS/WASM APIs.
FossilOrigin-Name: 7f5db9829b6e60fadb756fea5442da1f4368c8428bb5cdaf14f97f0c3c8451d9
|
2022-10-12 15:54:28 +00:00 |
|
stephan
|
b75971e6e9
|
Minor doc cleanups and corrections in sqlite3-wasm.c
FossilOrigin-Name: 5144c122a921e4240901cf4eb46347b92213273eec7cf0977952ab2b60722c27
|
2022-10-12 15:40:16 +00:00 |
|
stephan
|
181f7e869d
|
Correct mismatched H1 tags in test code. Minor CSS tweaks.
FossilOrigin-Name: 4d8eb90a370054d4482c20637ab56f5e01f4d10215f2af4e35fb9a1f85ecb700
|
2022-10-12 14:39:15 +00:00 |
|
stephan
|
50661c5e31
|
Remove some extraneous debug output.
FossilOrigin-Name: 56ff42053f7b73b380c103a84f29e285cfbfb6e18a25b3a50a6d78e32610914e
|
2022-10-09 17:08:36 +00:00 |
|
stephan
|
d8897d971b
|
Remove a now-unnecessary --cachesize flag for the OPFS sqlite3_vfs speedtest1-worker.html invocation.
FossilOrigin-Name: 08b516d6953256cfb8792cfee9e6ed7450fd55d84196b66b77409cfaee3c8729
|
2022-10-09 17:03:48 +00:00 |
|
stephan
|
ff891b4e1c
|
Minor cleaups in the post-init async phase of sqlite3 module initialization.
FossilOrigin-Name: 2e024a6b533524b7732cea8aa27b16363e17b4c32731ddf31085e91fc728c1af
|
2022-10-09 15:12:37 +00:00 |
|
stephan
|
392fd3ce37
|
Remove ext/wasm/kvvfs.make which was inadvertently resurrected in [92b500da70a3].
FossilOrigin-Name: 2e7fa085fc0b1202c6502d89e2603ae76a93451754b07b32ab4f0211f213f980
|
2022-10-09 13:35:14 +00:00 |
|
stephan
|
4fbf90ee11
|
Refactor kvvfs JS bits to make use of [ea370b9b05f7ed7eaa]. At main-thread 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
|
2022-10-09 13:26:15 +00:00 |
|
stephan
|
d6555726ed
|
Add -DSQLITE_OS_KV_OPTIONAL to speedtest1 flags for kvvfs testing purposes.
FossilOrigin-Name: 92b500da70a3dc64e910c232a2cac7620b6609162c2a5058b269d3b83d763c02
|
2022-10-09 11:42:12 +00:00 |
|
stephan
|
9a55773b2f
|
Replace time-based auto-unlock of opfs sync handles with lock acquisition/release via sqlite3_io_methods::xLock/xUnlock().
FossilOrigin-Name: 2625b7cfe1640c1d7e779ec1f37db970541598c0dc3e22e5eecf3c772d95ad40
|
2022-10-04 17:06:51 +00:00 |
|
stephan
|
ed3182f233
|
Tweaks to the opfs async wait/relinquish times.
FossilOrigin-Name: 35f33c23e5849de1c43c4499ee0a7fa11d26ae34949c1e820c3fa8e8873f9c2b
|
2022-10-04 11:14:23 +00:00 |
|
stephan
|
98e120fca0
|
Update ext/wasm/api/README.md to account for recent changes.
FossilOrigin-Name: 9d488081fc82a9abe3e81c7897fe6b29b6b337f62d0c62cb9cec7517bd54b53f
|
2022-10-04 09:12:43 +00:00 |
|
stephan
|
c7fb48d4b6
|
OPFS async proxy: add a wait-and-retry policy to the get-sync-handle step to help account for cross-tab locking.
FossilOrigin-Name: 45c48c63d311052105d102189208495b2b53fa3c4174884ecf63b757aa4016e5
|
2022-10-04 09:12:05 +00:00 |
|
stephan
|
f6b6188bdd
|
Update the 'start in speedtest kvvfs' link in speedtest1-worker to account for recent changes.
FossilOrigin-Name: f4d5ba412e0c1a031430a32c9ed1e11a09af33f9883150e660cc05e49fe56e6a
|
2022-10-04 08:58:22 +00:00 |
|
stephan
|
2716cd2528
|
Minor pstack doc update.
FossilOrigin-Name: 6b4fb7c4e399ecc948ad41f5fa3139a9293cc822cd7efa2b83dc5fb1660b3ec6
|
2022-10-04 01:21:34 +00:00 |
|
stephan
|
2b776ee2d6
|
Minor cleanups and additions in sqlite3.capi.wasm.pstack.
FossilOrigin-Name: 97bd670d3859bd3f2e62c15065b238b85ef614f26479e56a14be42c5784aedf4
|
2022-10-04 01:11:10 +00:00 |
|
stephan
|
3c272ba380
|
Add a test/debug mechanism to shut down the OPFS async listener so that it can be inspected (it normally can't be because its tight event-listening loop ties up the thread) and then restarted.
FossilOrigin-Name: 7d0bcff4e9b899cd25b393b9f0a02c5dcee2e229f0a0fa01719c7dcd7dcbe7c1
|
2022-10-04 00:54:00 +00:00 |
|
stephan
|
88838f6b95
|
Set default page cache size to 16mb in wasm builds. Fix an off-by-one counter in sqlite3_wasm_enum_json(). Minor coding style conformance tweaks.
FossilOrigin-Name: 72a9e589cc318ec50941739e2edf2c0636284b316c3bf87b71fd363b37619da3
|
2022-10-03 23:13:05 +00:00 |
|
stephan
|
faf6a07965
|
Add a --cachesize flag to the speedtest1-worker-opfs link in index.html because opfs is much faster with that.
FossilOrigin-Name: 5b8f8e33afc47c9f0c64dbe34643d7d1c37a0a82afb4656e714a86ef54a9ce6f
|
2022-10-03 22:51:24 +00:00 |
|
stephan
|
8d9e595513
|
Minor JS doc updates and typo fixes.
FossilOrigin-Name: 3cfcc14dfd220536141aeffb902fdc8db1cea055b2a0609b88e092fc3df94688
|
2022-10-03 22:38:00 +00:00 |
|
stephan
|
d234902b7c
|
Add configurable cache_size to batch-runner and speedtest1-worker. Add SQL tracing to demo-123.js just for demonstration's sake.
FossilOrigin-Name: 2ab065133bec19f71a1dc382946fdbd020920b2e38a526f4126a3a1e8df5de87
|
2022-10-03 18:07:25 +00:00 |
|
stephan
|
4b074692f4
|
Omit WAL mode from the wasm build.
FossilOrigin-Name: 88efe2a62b81e5ee9119f54204e397fda59666a327158c7b7c972e84a716869e
|
2022-10-03 18:05:27 +00:00 |
|
stephan
|
57956a9c86
|
Resolve/remove a TODO.
FossilOrigin-Name: 2ea35fea3bac2637e935643edfa7913b792e529de3a8980dbb8678d98ed5bcf9
|
2022-10-03 13:46:20 +00:00 |
|
stephan
|
4f5bbedb3a
|
Export sqlite3_trace_v2() to wasm and use it to ensure that the new per-VFS post-open SQL support in the DB ctor works. Default opfs vfs to journal_mode=truncate, as it's faster in that mode. Add 't' DB open-mode flag to enable SQL tracing to console.log().
FossilOrigin-Name: 508f7f6d63e52f61fae5abe817579a4e130fa7fbd18733d741d521a5bdabb7ce
|
2022-10-03 13:03:41 +00:00 |
|
stephan
|
a4c357f94c
|
Reimplement fiddle_reset_db() so that it works with all VFSes.
FossilOrigin-Name: 18462052903bfeb037dd9af3a1fe1898d141eff5d6f527721858120553de808d
|
2022-10-03 11:42:45 +00:00 |
|
stephan
|
5f0b67cb7a
|
Experimentally relinquish the OPFS VFS sync access handle when the db is idle and reacquire it on demand, the goal being to help alleviate cross-tab locking issues.
FossilOrigin-Name: 2703ac9842335962e488e597168d70b1389b95a6ad39edf70a211b95979b4708
|
2022-10-03 11:33:35 +00:00 |
|