aboutsummaryrefslogtreecommitdiff
path: root/ext/wasm/api/sqlite3-wasm.c
Commit message (Collapse)AuthorAge
* Use SQLITE_EXTRA_INIT_MUTEXED instead of SQLITE_EXTRA_INIT for the ↵stephan2025-03-01
| | | | | SQLITE_WASM_EXTRA_INIT feature, as suggested in [forum:14183b98fc0b1dea|forum post 14183b98fc0b1dea]. This doesn't make a functional difference now - this is in the name of future-proofing against eventual threading support in wasm. FossilOrigin-Name: 46479c2e30b9676e0fa8da117ba67f673671fb340c9bea38ece19a1b2371a57b
* Approximately 100 typo corrections spanning the whole tree, submitted via ↵stephan2025-02-27
| | | | | [forum:0db9827f0464bc33|forum post 0db9827f0464bc33] and individually audited and verified. Affects only code comments, innocuous test strings, error message text in tool (not library) code, and configure-level help text. FossilOrigin-Name: f50c21484d3cac73589da0376c423de39ae8b842218105786c5aa3726e4dcaed
* Approximately 50 typo fixes, spanning the whole tree, contributed via ↵stephan2025-02-25
| | | | | [forum:006c8fa165083ac3|forum post 006c8fa165083ac3] and individually checked for correctness. Affects only code comments, docs, and a single line of debug output in a test app. FossilOrigin-Name: af928818a030924060ee0762431dae0f16d53a62f4e1132754d052eb9c621ac2
* Expose the new SQLITE_DBCONFIG_ENABLE_ATTACH_CREATE/WRITE and ↵stephan2025-01-31
| | | | | SQLITE_DBCONFIG_ENABLE_COMMENTS (from [325e547a21955]) to JS/WASM. FossilOrigin-Name: 8da1a9af66f905c683e9c3445d609b5c0e11ac912be192c468ddd79f237837f4
* Remove a few more traces of long double from the code.drh2024-10-02
| | | FossilOrigin-Name: 11d6a89e4a25c3f884ff617036d239dc42522859400cd1f4674634f6c7adbb02
* Another comment about the LONGDOUBLE wasm topic. No code changes.stephan2024-10-01
| | | FossilOrigin-Name: 1755831cb1ac58241e0b11d8d003b5eca39b65aa3cb84229b215662028b1b3c0
* Use the new SQLITE_USE_LONG_DOUBLE to disable long-double support in WASM ↵stephan2024-10-01
| | | | | builds, as they cannot be represented in JS and this saves approximately 5.5kb in the resulting wasm file. FossilOrigin-Name: fa7b56f776b715d061581fad6f04b871504ff5d808e7364419d1d6cdef82c5ee
* Add an #if'd-out block to sqlite3-wasm.c mentioning the LONGDOUBLE_TYPE, as ↵stephan2024-10-01
| | | | | brought up in [forum:cbfb0d0ac0a4e349 | forum post cbfb0d0ac]. No functional changes. FossilOrigin-Name: 0b83e8f1ef53b35a9dda0740b4922b8691428f7484f3058833a961f3f8d0b178
* Strip progress handlers and window functions from the wasm bare-bones ↵stephan2024-07-25
| | | | | (formerly 'minimal') JS bits, noting that we can't yet use OMIT_WINDOWFUNC (for the C parts) without a custom amalgamation. Currently at 604kb. FossilOrigin-Name: ec02e9237e1ef81c4196fa630822cb109eab926143ad09593a24273eb0668601
* More work on the minimal-mode wasm build (now 603kb uncompressed). Remove ↵stephan2024-07-25
| | | | | the hard-coded feature-enable flags from sqlite3-wasm.c and rely on the build to provide them. Some wasm build cleanup, but attempts to completely overhaul it have been thwarted by my inability to make script-generated makefile code more legible/maintainable than the current eval spaghetti. FossilOrigin-Name: b029c4067943e366a9b25b8303136fab10822bd771ea4658ac4cd716ff4a0d8f
* wasm minimal build: strip authorizers and JSON support (saves approx 35kb). ↵stephan2024-07-24
| | | | | Strip vtab support from the JS bits but cannot yet strip it from the C bits because that requires a custom-configured sqlite3.c. FossilOrigin-Name: eb64d106551718467e0f6c6b53695410bf4c566901008e4cda8580d0f7efa7b0
* Restructuring of the wasm build to support an experimental 'minimal' build ↵stephan2024-07-24
| | | | | mode which elides all non-core APIs. FossilOrigin-Name: ee2191f7302210100fa0b29ace8156531ad995bf61aa2642e526e0901d0c6862
* Remove some dead WASM-side code.stephan2024-04-23
| | | FossilOrigin-Name: 0a07ee27bd6021a6fc1d81133012592351530ffcf6ae09322ea74624cff910df
* Extend the JS/WASM SEE build support by (A) filtering SEE-related bits out ↵stephan2024-04-22
| | | | | of the JS when not building with SEE and (B) accepting an optional key/textkey/hexkey option to the sqlite3.oo1.DB and subclass constructors to create/open SEE-encrypted databases with. Demonstrate SEE in the test app using the kvvfs. This obviates the changes made in [5c505ee8a7]. FossilOrigin-Name: 8fbda563d2f56f8dd3f695a5711e4356de79035f332270db45d4b33ed52fdfd2
* Add comments (only, no code) to the JS sqlite3_config() bindings reminding ↵stephan2024-03-21
| | | | | us why SQLITE_CONFIG_ROWID_IN_VIEW is specifically not included. JNI does not need this treatment because it explicitly supports only a very small subset of config options. FossilOrigin-Name: 4fea396221e84f9532f9327226691621a23bd966a860329fc579141c69cf7f64
* Make explicit which JS APIs are for internal use only by moving the JS-bound ↵stephan2024-01-08
| | | | | internal-use-only functions out of client-visible reach and renaming the WASM-exported ones from sqlite3_wasm... to sqlite3__wasm... (with two underscores). These have always been documented as internal-use-only, so this is not a breaking change except for clients which have ignored the docs. FossilOrigin-Name: 0eddc20f37988df6bce5f407b69e4a315e5cca4af104586e6fe942f0d656cccd
* Update and clean up the in-makefile docs for ext/wasm.stephan2024-01-02
| | | FossilOrigin-Name: 7a7b295e6d7e95ee4a46cc42761895d11700ab295870c5a4380072bb4a5b7099
* Back out [99d11e6d0ae6] (enabling of STAT4 in WASM/JNI), per /chat discussion.stephan2024-01-01
| | | FossilOrigin-Name: cd7929ee2e2c305475fa5a4dff2edaccf90067126ef04a1c2714cf464925453f
* Use SQLITE_ENABLE_STAT4 in both the WASM and JNI builds.stephan2023-12-31
| | | FossilOrigin-Name: 99d11e6d0ae687ff6bac5119027f7b04d5e7185214e79cf8c56289cfa809b0f9
* Use SQLITE_STRICT_SUBTYPE=1 by default for the JNI and WASM builds unless ↵stephan2023-12-14
| | | | | they're explicitly built with SQLITE_STRICT_SUBTYPE=0. FossilOrigin-Name: 990211357badf0ab08bd34cf6d25b58849d0fd8503e289c1839fc837a74e1909
* Expose the missing SQLITE_SUBTYPE to wasm.stephan2023-11-10
| | | FossilOrigin-Name: ac9534b2ceb8185b1fc03282f881cd3e4aea64af75a02ebded1e07d4d8278739
* Expose SQLITE_RESULT_SUBTYPE to wasm.stephan2023-11-09
| | | FossilOrigin-Name: 6d2fe9848beb35a8206e49c2ffae29a3eb2fe6411d77f366e962ced3f83e4749
* Remove the SQLITE_MAX_ALLOCATION_SIZE flag (set to 536mb) from the WASM and ↵stephan2023-10-28
| | | | | JNI builds because it can unduly limit db exports via sqlite3_serialize(), as reported in [forum:75524f7342c1ba45|forum post 75524f7342c1ba45]. It now defaults to whatever sqlite3.c uses, which is currently just shy of 2gb. FossilOrigin-Name: f6e1137919243c5ce86725df64b40b7e12e82cbceaff210ca41616d620f0dd1b
* Unconditionally force use of SQLITE_ENABLE_API_ARMOR in the WASM and JNI ↵stephan2023-10-11
| | | | | builds. Their corresponding test suites still work. FossilOrigin-Name: c11394b50d0687b6d6abad9c80d5cd3cdce77e9b9c278f40601c460f463744a1
* JS SQLTestRunner can now run the Java impl's core-most sanity tests, missing ↵stephan2023-08-29
| | | | | only support for directives. FossilOrigin-Name: 5e798369375ce1b0c9cdf831f835d931fbd562ff7b4db09a06d1bdca2ac1b975
* Ensure that db mutex is held when using sqlite3ErrorWithMessage() to avoid a ↵stephan2023-08-24
| | | | | potential assertion in debug builds. FossilOrigin-Name: b8f6a50a4bf9478324f0272d79f2fe6992a49b753e79e39a268c6afb261bb01e
* Add sqlite3.capi.sqlite3_js_posix_create_file() and oo1.OpfsDb.importDb() as ↵stephan2023-08-11
| | | | | alternatives for the newly-deprecated sqlite3_js_vfs_create_file(). FossilOrigin-Name: da6eaf8d8258f3e2c8633fd7faf4e90c3307b5c60bd8b69c626b3c82b19dbdef
* Deprecate sqlite3_js_vfs_create_file() because, it was discovered today, its ↵stephan2023-08-11
| | | | | out-of-scope use of the sqlite3_vfs, sqlite3_file, and sqlite3_io_methods APIs triggers unresolvable assertions in the core when built with SQLITE_DEBUG. FossilOrigin-Name: f3647a3ac8eca8c821b0b1e403da7bfb0feabd0eb5ee83709cd4956dfc56a492
* Change wasm build's -DSQLITE_TEMP_STORE=3 to -DSQLITE_TEMP_STORE=2, ↵stephan2023-07-17
| | | | | primarily so that clients can optionally shift temp files from memory to OPFS storage. FossilOrigin-Name: 764430e804332b8f7b2f63a3c0c8acf8f6cc92534858d89de2d310938c1c0d27
* Expose the SQLITE_DBCONFIG_STMT_SCANSTATUS and ↵stephan2023-05-01
| | | | | SQLITE_DBCONFIG_REVERSE_SCANORDER sqlite3_db_config() options to JS. FossilOrigin-Name: 0a7024af3f0e1dddc1a60c67bc4084e46b297dc16fe753bd5e6a45a59fd1cfa4
* Expose the new SQLITE_VTAB_USES_ALL_SCHEMAS to JS.stephan2023-04-04
| | | FossilOrigin-Name: b7ef09be667dd349e195842304c03cbebb1693164e1c3587a5d7c96baa713edf
* Export SQLITE_FCNTL_RESET_CACHE to JS.stephan2023-03-10
| | | FossilOrigin-Name: 6195cfc86b15614b8db0e0dc5cc79b8d1acaf483f0131c8526992dc8ca075630
* Export the new SQLITE_CHANGESETAPPLY_IGNORENOOP flag to JS.stephan2023-03-08
| | | FossilOrigin-Name: ac7359b2633ead74a53b2796fe038ca285aacad45b45980db2a76a87154e66e3
* Extend wasm build to support a custom sqlite3.c to support building against ↵stephan2023-03-08
| | | | | sqlite3-see.c. The JS code now binds the SEE-specific functions if it detects an SEE build. FossilOrigin-Name: dd8612c8adbaf9d06bf0d7319b9afc9bd8ca3d0fcfa1cb591a7a2fcb86480048
* Extend wasm build to enable inclusion of client-custom C code, initialized ↵stephan2023-02-27
| | | | | via the SQLITE_EXTRA_INIT mechanism, per discussion in [forum:1e1c04f3ed1bc96b|forum post 1e1c04f3ed1bc96b]. FossilOrigin-Name: 68a52cafff60f19c9c998133d04f192b1e8b23f78b8cee13807d76845ef5e13d
* Remove the JS-side SQLITE_WASM_DEALLOC sanity check which triggers the ↵stephan2023-01-04
| | | | | problem mentioned in [688c5c13d156] and [ae0196d86ee8], for reasons covered in the code comments, per discussion in [forum:e5b20e1feb|forum post e5b20e1feb]. FossilOrigin-Name: 65ff3200c6009a1649fc108d7ce36f5c014185ba46bbf98471ec86eaeb572656
* Add some docs explaining a particular piece of [ae0196d86ee8]. No code changes.stephan2023-01-02
| | | FossilOrigin-Name: 7f96803c1cbd0633367173ab0a67a8b301b9e0746e460c50d506b536c15db0a0
* Another reformulation of SQLITE_WASM_DEALLOC to attempt to work around a ↵stephan2023-01-02
| | | | | Safari-specific quirk reported in [forum:5489305f601b8c3f|forum post 5489305f601b8c3f]. FossilOrigin-Name: ae0196d86ee8ca424b5ef5a43c32988f4ab5131ea146669bc1467e31a2384901
* An alternative solution to mapping SQLITE_WASM_DEALLOC to the proper ↵stephan2023-01-01
| | | | | function pointer in JS, to account for a Safari-specific quirk reported in [forum:e5b20e1feb|forum post e5b20e1feb]. FossilOrigin-Name: 688c5c13d156f987b895df1d5a5b770616b0d9caec4726e03ba122eb8539e7b2
* Merge trunk into wasm-session-api branch.stephan2022-12-25
|\ | | | | FossilOrigin-Name: 7f8f1acd82be7dc2eb2147d96299b1b443e86774dfe0b0a8d32669a0500fc9c6
| * Add missing sqlite3_context_db_handle() JS binding. Reimplement ↵stephan2022-12-25
| | | | | | | | | | 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
| * Replace JS-side use of SQLITE_TRANSIENT with the new SQLITE_WASM_DEALLOC, ↵stephan2022-12-24
| | | | | | | | | | 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
* | Merge trunk into wasm-session-api branch.stephan2022-12-23
|\| | | | | FossilOrigin-Name: f1decc831fe0dc8523956e74474d9663852b0e5b56240dd8504952726e713a97
| * Add SQLITE_ENABLE_MATH_FUNCTIONS to the list of feature flags in sqlite3-wasm.c.stephan2022-12-23
| | | | | | FossilOrigin-Name: 58503cd148c9613abfaf7c1386c34806150bd521966864ccbb821ea7dede8e5a
* | Add sqlite3.capi JS bindings for the sqlite3session_...(), ↵stephan2022-12-23
| | | | | | | | | | 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
* | Initial pieces for binding the session API to JS. Far from complete. See ↵stephan2022-12-23
|/ | | | | [forum:210e36a1e3 | forum post 210e36a1e3] for the discussion. FossilOrigin-Name: cd8c100808da1043fcf63555f48f30c90272c48c6627321ceb0a0995b34733d1
* Expose a JS-friendly subset of sqlite3_config() to JS, with the notable ↵stephan2022-12-16
| | | | | 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
* Add sqlite3_set_authorizer() support and related tests to JS.stephan2022-12-16
| | | FossilOrigin-Name: 551b848894c249cb3c9d237643d2ed53ffcb3b003d0cf3f797a535df1731ce39
* Added a couple missing 'not part of the public API' tags on functions in ↵stephan2022-12-15
| | | | | sqlite3-wasm.c. No code changes. FossilOrigin-Name: eb27feecea508f3491a09699f2339951facd2345d479cfd3020183dc2af703b2
* Expose sqlite3_txn_state() to wasm.stephan2022-12-12
| | | FossilOrigin-Name: f6f3397a4667b15a96bdf4189c54789d622fd90351405e963d7f56ac93a9344c