aboutsummaryrefslogtreecommitdiff
path: root/ext/wasm/api/sqlite3-api-oo1.js
Commit message (Collapse)AuthorAge
...
* Move the sqlite3.capi.wasm namespace to sqlite3.wasm. This causes a tiny bit ↵stephan2022-10-29
| | | | | of naming confusion with the sqlite3.wasm *file*, but seems to make more sense than having it as a sub-namespace of capi. FossilOrigin-Name: 3f16eb18d6186ca972fca952ccac18649e7a905213f589e53c0c9333e695448d
* Minor sqlite3.oo1 API reorg prompted by documenting.stephan2022-10-28
| | | FossilOrigin-Name: 55237924ca363c5a3e0f8c82620eb6626a98311615866197375a86876b9da3a1
* Replace the newly-removed oo1.DB.getFilename() with DB.dbFilename() with the ↵stephan2022-10-26
| | | | | hope that the distinction from the dbInstance.filename property is clearer. FossilOrigin-Name: 0b80543d75504c733b73b32f73b96074a4b0cebad64e47032926a3fefee41726
* Remove oo1.DB.hasFilename() and getFilename(), as they are unnecessary.stephan2022-10-26
| | | FossilOrigin-Name: 75c546b982024bf2b527c85271111d54158cb010867f6e29fc89e86cc8457cc5
* Add kvvfs tests to tester1.js. Fix a scopedAlloc() misuse in oo1.DB ctor ↵stephan2022-10-21
| | | | | caused by refactoring earlier this morning (and caught by these new tests). FossilOrigin-Name: 8e0f001ab76de6dbc17295b9085f7f61ce274c43f8c432ea4d2ec3153d248ff3
* Add timing info and OPFS sanity tests to tester1.jsstephan2022-10-21
| | | FossilOrigin-Name: 99915b0076422487cdd181a54e55694404fba13e4a540329b5ede9e2c9e12532
* Expose sqlite3_vfs_unregister() to WASM and unregister kvvfs in Worker ↵stephan2022-10-21
| | | | | threads to avoid its unintended use there (in contexts other than local/sessionStorage). Correct registration of window functions, extend oo1.DB.createFunction() to support window functions, and add window function tests to tester1.js. Correct an incorrect 1-arg handling case for DB.exec(). Add per-test assertion counts to tester1.js. FossilOrigin-Name: f07ce15479b7224b0d1ba9f147a433136e70c1461aa667d2737d4a918f778f55
* Add more JS tests. Flesh out the aggregate UDF tests to use ↵stephan2022-10-20
| | | | | sqlite3_aggregate_context() so that they can each be used multiple times in the same statement. Add sqlite3_js_aggregate_context() convenience helper. FossilOrigin-Name: 9d034ef5e1bab7c9651c2450dc85765fa6365d3f1414c711550de858ff8b3ece
* Rename sqlite3_web_... to sqlite3_js_... Document the worker1.close.unlink ↵stephan2022-10-20
| | | | | option. Fix unlink usage in speedtest1.html. Minor JS build cleanups. FossilOrigin-Name: ac9af71b72a749b0a040273a88480d56f49570b569389a4ea20cc055f494d8ff
* Minor tweak to get bring an edge case of oo1.DB.createFunction() into ↵stephan2022-10-16
| | | | | aggreement with its docs. FossilOrigin-Name: 8d59ccd9f357fbed0b0790508ca9027194fc4b0131029f9f460c7b4bde806a5f
* Add aggregate function support to sqlite3.oo1.DB.createFunction(). Change ↵stephan2022-10-16
| | | | | 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
* Move the rest of testing1.js into tester1.js and eliminate the dependency on ↵stephan2022-10-13
| | | | | jaccwabyt_test.c. Extend the list of default config-related #defines in sqlite3-wasm.c and reorganize them for maintainability. FossilOrigin-Name: 4e2a8aff2dd4b6e148f45184e2523ebe47815257eca97fa3d32bcbf9625f0def
* Resolve/remove a TODO.stephan2022-10-03
| | | FossilOrigin-Name: 2ea35fea3bac2637e935643edfa7913b792e529de3a8980dbb8678d98ed5bcf9
* Export sqlite3_trace_v2() to wasm and use it to ensure that the new per-VFS ↵stephan2022-10-03
| | | | | post-open SQL support in the DB ctor works. Default opfs vfs to journal_mode=truncate, as it's faster in that mode. Add 't' DB open-mode flag to enable SQL tracing to console.log(). FossilOrigin-Name: 508f7f6d63e52f61fae5abe817579a4e130fa7fbd18733d741d521a5bdabb7ce
* More cleanups in the UDF argument and result handling, in particular int64. ↵stephan2022-10-02
| | | | | Consolidate some duplicate int64/bigint range checking code. Expose the UDF low-level utilities (arg/result conversion) to client code. Add the sqlite3_context pointer to the JS-side UDF wrappers for API consistency. FossilOrigin-Name: 10ab77af952abf09f93f342a9d07a3b133f2c4c0a3588df3390cd3a923cafae4
* js: implement a hand-written wrapper for sqlite3_create_function_v2() which ↵stephan2022-10-02
| | | | | converts, if necessary, JS-function-type args to WASM function wrappers. Replace DB.createFunction() impl with the new one. FossilOrigin-Name: 435ab33384017967e46f52b70bee851a85a28808990a0e58dd5288f606b89c9c
* More fleshing out of sqlite3.capi.wasm.pstack.stephan2022-10-02
| | | FossilOrigin-Name: eb5726677a727a958df11f1fba078d30c7c0ba2a9bdb158e8641b35b5f971af3
* General internal cleanups in the oo1 API.stephan2022-10-02
| | | FossilOrigin-Name: f9db664f756f3707afcb5dce87f6d946625848f27ea84337af68de72d4ad6c6b
* Add oo1.JsStorageDb.clearStorage/storageSize() methods, copies of ↵stephan2022-09-30
| | | | | capi.sqlite3_web_kvvfs_clear/size(). FossilOrigin-Name: 1e09efe7fa15b8908f8b8353164a8361de778e27ea6c0b11c402bf4e1c56333d
* Add oo1.JsStorageDb() as a convenience wrapper for oo1.DB(...,'kvvfs'). ↵stephan2022-09-30
| | | | | Minor doc cleanups. FossilOrigin-Name: 8a7998709f859a562cf6829485cb9921f8823af0efabe003741348ab1169fb89
* wasm/js: rename /persistent to /opfs to account for potential future ↵stephan2022-09-27
| | | | | persistent storage options. Minor flag-handling cleanups in the speedtest1 pages. Minor API tweaks in oo1. FossilOrigin-Name: 4dc972a3656b2a9ec915bfb3f653136560c753ce4024c3f0d0d0c28f66db7a0a
* Fiddle: replace db export routine with a C-side one which works for both ↵stephan2022-09-26
| | | | | Emscripten FS-hosted and OPFS-hosted db files. Minor code-adjacent cleanups. FossilOrigin-Name: 3579a8d6f1f6cd3cd8aad9949536870c5fe7bae8c1778f700dd85d763e266b94
* Merge kv-vfs-magic-names branch into fiddle-opfs branch and make some ↵stephan2022-09-20
|\ | | | | | | | | kvvfs-relevant tweaks. FossilOrigin-Name: e3d36dcdd37e59f17a07d3611d08744eb86f439fab82a648490dd608bcaa3185
* | Numerous cleanups in the JS bits. Removed some now-defunct wasm test files. ↵stephan2022-09-18
| | | | | | | | | | Expose sqlite3.opfs object containing various OPFS-specific utilities. FossilOrigin-Name: 26e625d05d9820033b23536f18ad3ddc59ed712ad507d4b0c7fe88abd15d2be8
* | More work on the synchronous OPFS experimentation. Numerous wasm/js build ↵stephan2022-09-15
| | | | | | | | | | tweaks. Add speeedtest-wasmfs.html, the wasmfs/opfs counterpart of speedtest1.html. FossilOrigin-Name: 00ee49a3a2c148480f614e49a0ee5b35a255758c0a53693f0b464b31e7a4045b
* | Clean up some JS documentation.stephan2022-09-15
| | | | | | FossilOrigin-Name: 925fdbfc6c1f9f06951346bc0d4fb81ffb5797d5f1123728931973f6cb1a0efa
* | Add/apply various kvvfs-specific utility APIs to the JS layer to assist in ↵stephan2022-09-13
| | | | | | | | | | testing and analysis. Correct a backwards default arg check for sqlite3ApiBootstrap(). Add exports for sqlite3_db_handle(), sqlite3_file_control(), and the SQLITE_FCNTL_xxx enum. FossilOrigin-Name: 0d78961870ee9f22f1ba16d423377d28dcc36e04b1e31ffd57f3e2fd51f8f0f2
* | Add sqlite3.oo1.DB.clearKvvfsStorage(). Add controls to kvvfs1.js demo to ↵stephan2022-09-12
| | | | | | | | | | reset and query the db without requiring the dev console. FossilOrigin-Name: d845c6c22bd5d3fffc66e0566df346d690dd8bd1fc1688e312161b1a1edcfd79
* | Merge kv-vfs branch into fiddle-opfs branch to add kvvfs-based wasm build ↵stephan2022-09-12
|\| | | | | | | | | and demo. FossilOrigin-Name: a7d8b26acd3c1ae344369e4d70804c0cab45272c0983cfd32d616a0a7b28acb9
* | Minor internal doc clarifications.stephan2022-09-06
| | | | | | FossilOrigin-Name: 09796cc2bfce7bc4ce11db9673d20737259e9928f0484660cba3a9751f7d01c5
* | Minor cleanups in OO API #1. Add Sudoku SQL to batch-runner.js's list.stephan2022-09-05
| | | | | | FossilOrigin-Name: 4488cb5798f34cbba14eb8e2aa5da8420c14a85d37d278d357406aedd5c3a9e5
* | Lots of tweaking in batch-runner.js. Minor internal API update in OO #1 API.stephan2022-08-29
| | | | | | FossilOrigin-Name: 24b82b9504db3d8e1335c2300b133f897dc1a541026dc24be5b0ffd8be66d977
* | Add get/setPtrValue() to the common wasm utils.stephan2022-08-29
| | | | | | FossilOrigin-Name: 24d70fc458c6002d5ff3c9f8ce7c66bde299b32aca6417c2dd1236e1412b036d
* | oo #1 api: correct a case where a null callback is called. Rename some vars ↵stephan2022-08-29
| | | | | | | | | | for clarity. Increase wasm-side memory in order to be able to load the speedtest1 output. FossilOrigin-Name: b5058f14fadbc8a1886f27cff08593dd2c8e2b2cb6d7bed3b8733a55f031989f
* | Consolidate oo1.DB.exec() and oo1.DB.execMulti() into oo1.DB.exec(). This is ↵stephan2022-08-25
| | | | | | | | | | a bit less efficient but certainly easier for a client to deal with and lightens the maintenance burden. FossilOrigin-Name: 7eff7213dff553b76d7ce45063e3c4a19544716611a0b609593d704076b38d0b
* | Refactor and expand the worker1 docs, consolidating them into the top of ↵stephan2022-08-25
| | | | | | | | | | their file instead of scattered around the internals. Accommodate an API change from yesterday in demo-oo1.js. FossilOrigin-Name: 0a65747047322b7b585e281ac275e437ce3f46e1d06105c19117213929a906ad
* | Change DB.exec() rowMode default from 'stmt' to 'array', per /chat ↵stephan2022-08-24
| | | | | | | | | | discussion. Add DB.exec() rowMode option for fetching a specific column by name. Add result column names to worker1 exec() callback interface, as there's otherwise no way to get that info from a worker. FossilOrigin-Name: 1bb37e5c477b9eb098362f74a45a55be23d450fe45cdff58c1cbff08b5b3998f
* | Expand the worker1 'exec' op handling for per-row callbacks for API-level ↵stephan2022-08-24
| | | | | | | | | | consistency and smooth some edges between worker1 core and worker1-promiser. Add worker1 'config-get' message to fetch the serializable parts of the sqlite3.config state. Improve the 'open' op's handling of the 'persistent' option (noting that we cannot yet test that case from a worker). FossilOrigin-Name: 509f8839201ec1ea4863bd31493e6c29a0721ca6340755bb96656b828758fea7
* | Refactor JS API amalgamation such that the bootstrapping/configuration is ↵stephan2022-08-22
| | | | | | | | | | deferred until the whole amalgamation is available, to facilitate providing clients with a way to initialize the API with their own config (noting that we're still one small level of refactoring away from being able to actually do that). FossilOrigin-Name: 9dbe9a6aecec43b51057375ef1d2d632db0d17eac8b7552c20cc91fc2f1a55d1
* | javascript: rename and simplify DB.callInTransaction() as DB.transaction(). ↵stephan2022-08-18
| | | | | | | | | | Add DB.savepoint(), which works the same as transaction() but uses savepoints. Correct concatenation of arguments to SQLite3Error to use spaces instead of commas. Test that demo-oo1.js works with persistent OPFS storage (output differs due to persistent rows, but the demo works). FossilOrigin-Name: e8c323f12b6223bc9dcbbec40698969c7917128aa50cf599c247df23f607ae61
* | Minor cleanups, reorgs, and doc updates for the JS APIs. Renamed ↵stephan2022-08-17
| | | | | | | | | | sqlite3(-api)-worker.js to sqlite3(-api)-worker1.js, for symmetry with sqlite3-api-oo1.js. FossilOrigin-Name: f5059ee6f9fc55a381cbf08a30dfb9a5636c0b44341e42f4e9f12a3b109b5507
* | wasm: add a small demo/presentation app for JS OO API #1 and make a few ↵stephan2022-08-16
| | | | | | | | | | minor additions to that API. FossilOrigin-Name: d6d79b661a1c6137d4693393e02416da4858d58dc84d144081a48d523655b483
* | wasm OO API #1: added DB.callInTransaction() and Stmt.stepFinalize().stephan2022-08-13
|/ | | FossilOrigin-Name: e37dddc1dd9c0530e4b1c6cb0ca7cba7451caa37734d383c9b47f378d7222242
* wasm refactoring part 2 of (apparently) 2: moved ext/fiddle/... into ↵stephan2022-08-10
ext/wasm and restructured the core API-related parts of the JS/WASM considerably. FossilOrigin-Name: 27f9da4eaaff39d1d58e9ffef7ddccf1e41b3726914f754b920e3e1fb572cba6