aboutsummaryrefslogtreecommitdiff
path: root/ext/fiddle/sqlite3-api.js
Commit message (Collapse)AuthorAge
* 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
* wasm: corrected the isInt32() check to account for negative values.stephan2022-06-25
| | | FossilOrigin-Name: 7223f4bb588b6c759754ef26cbefbb172e767eaa80989b8f9ef104d4e8b9d856
* wasm: added bindings for sqlite3_extended_result_codes(), sqlite3_open_v2(), ↵stephan2022-06-25
| | | | | and the SQLITE_OPEN_... flags. FossilOrigin-Name: ac876ab9913332c9a5e3045824bf92a2501707aecfb13906d5c280302d9878a9
* wasm: lots of doc additions and refactoring. Refactored the WASM memory heap ↵stephan2022-06-25
| | | | | usage to hopefully eventually account for a runtime-growable heap. Differentiate between supported TypedArray types for input SQL strings vs binding/fetching blobs. Might (untested) have implemented the ability to bind UtfNNArray values as blobs, where NN is one of 16 or 32. FossilOrigin-Name: e10d57dfbaa672a3a4cbfd9a9209552c3bde15cc75af838690ca412fd182066a
* wasm: added utility C code to generate a JSON-format "enum" of the numerous ↵stephan2022-06-25
| | | | | SQLITE_xyz constants so that we do not risk those getting out of sync in the JS code. Renamed initSqlite3Module to sqlite3InitModule. Cleanups in the TypedArray handling. FossilOrigin-Name: 778062e3b415dca5104eee398950741b6dbb9d4bdf7c998eef18371a42669946
* wasm: eliminated the need for Stmt objects to keep ahold of memory allocated ↵stephan2022-06-25
| | | | | for bound strings and blobs. Added alternate string/blob bind impls which are hypothetically more efficient but not yet proven to be so. FossilOrigin-Name: da1d3151a440567f34a2f6c0b2bfc2e9fab81c256cc361c9ce7b46f2c23a2aa8
* wasm: eliminated the dependency on the deprecated emcc-provided allocate() ↵stephan2022-06-25
| | | | | function. Adjacent cleanups in blob binding. FossilOrigin-Name: 140618b212e3aa9ff2df20f22af846a1c4c5ffaeefd84330446f61362b39a8f1
* wasm: corrected the propagation of text/blob values via UDFs. DB.exec()'s ↵stephan2022-06-25
| | | | | sql may now be an array of strings which get concatenated together before passing it on to sqlite3_prepare_v2(). DB.exec()'s callback now applies to the first statement which has result columns instead of only the first statement. Fixed a precedence but which caused isInt32() to report false positives. FossilOrigin-Name: 37a8fecb56793fbd3763a2240a0bd62b639c811934d3af2ef0e5ff579073d632
* Minor wasm doc tweaks.stephan2022-06-25
| | | FossilOrigin-Name: 42dc500819bfc1308a9542aa2cae4f6dfd98a29237c59cec82e0e6f9e0bf3779
* wasm binding: consolidated the two sqlite3_prepare_v2() bindings behind a ↵stephan2022-06-25
| | | | | single dispathcer. Various internal cleanups and refactoring. Branched because trunk is in pencils-down mode for pending 3.39 release. FossilOrigin-Name: ab3e50dab4d71557ab5d179bbd6caf7fb61ab7c51dffc8e4714441c189ce3e5c
* shell: in WASM mode, permit ATTACH because the filesystem is a virtual ↵stephan2022-06-06
| | | | | sandbox and ATTACH can be used to provide more import/export options. Minor doc updates in sqlite3-api.js. FossilOrigin-Name: f28de5b726999b913b442fa51355d020ba1f1662d2f7978380623c16438eb238
* fiddle: added another UI element to the list of those which are disabled ↵stephan2022-06-01
| | | | | during long-running activities. Added DB.close() binding to the Worker-based wasm binding. FossilOrigin-Name: 5933163ed1a8f996e81023c7c5822655dc6411d30016f37fe8863f760530dc5b
* The Worker-specific variants of the most significant DB-class JS bindings ↵stephan2022-06-01
| | | | | are implemented, most notably various uses of DB.exec(). FossilOrigin-Name: 371d6f7497016ca9bf82c8524b4d701ddf1e614b3fb4e69ff63935da0d51ed05
* Initial proof of concept code for a JavaScript binding which runs in the ↵stephan2022-06-01
| | | | | main window thread but acts on a db handle running in a Worker thread. Expanded the DB.exec() and DB() constructor to simplify certain use cases. FossilOrigin-Name: d9efe3e92d1c95aee6f5ae37a8ba28d8cf4891d746744ce4aa2464f766821a0b
* Initial bits for a JS API variant in which the client operates in the main ↵stephan2022-06-01
| | | | | thread and sqlite3 in a Worker. This is far from complete. FossilOrigin-Name: f6d6f969791f0d2367ae5418623b4794f6df657d9d7d9002fb5aec4206dcfd4c
* Got the sqlite3-api JS bits wrapped up in deferred-load module. Whether ↵stephan2022-05-25
| | | | | that's going to be easier to use, in practice, remains to be seen. Consolidated two of the test-related JS files. FossilOrigin-Name: dd83cc05f2522d221641807dd66b33df48ac9264f27e5b6f63f312084f109801
* fiddle: added support for exporting (downloading) the current db file. To do ↵stephan2022-05-24
| | | | | this we had to fall back to named dbs, instead of defaulting to an in-memory one, but the virtual filesystem is an in-memory FS, so the end effect is the same. FossilOrigin-Name: 7c7fd34c8a05832a3973aaffe696250cb4d2a0b1646c9bfbe83970daf33cd817
* fiddle: initial work on loading a client-side db file. Works but requires ↵stephan2022-05-24
| | | | | some cleanup. Export is not yet implemented. FossilOrigin-Name: 0fa8378c006fcf2311772d36cf2e3c2cd8e8648f671de89ee9832e2e1a06ef49
* fiddle: lots of generic refactoring, restructuring, and cleanup in the ↵stephan2022-05-24
| | | | | higher-level code. Added push-fiddle ext/fiddle/Makefile target to push the fiddle app to a remote server via rsync. FossilOrigin-Name: ed19fef3459499abb0a4a010f368b4576d6e068d930c8480446ea677ac87c1c1
* wasm/JS: minor doc updates, corrected bind()ing of the undefined value to ↵stephan2022-05-24
| | | | | behave as documented, removed some superfluous code. FossilOrigin-Name: 526c8c728019b317624a93f6f07840ca524bca84e7c03ce5e86e38953146236f
* wasm/JS: documented DB.selectValue() and corrected the fetching of NULL ↵stephan2022-05-24
| | | | | columns via Stmt.get(). FossilOrigin-Name: 70f91fab825d365f505750acdb8d3ae532880c4cdb64d1e61bb21b24a115958b
* wasm/JS: added support for scalar UDFs. Fixed a deallocation problem with ↵stephan2022-05-24
| | | | | bind()ed strings/blobs. FossilOrigin-Name: 325a9ee31ad7abae563c4da5cd8228e151b00aa9afcac7e9bca5efaa9d48e107
* wasm: added missing 'use strict' and fixed an undeclared var use caught by that.stephan2022-05-23
| | | FossilOrigin-Name: c16a7f4950d47c2f5177db7dc5d83f0f11eb0cafdce1ec688d6f1bd740d92733
* wasm: corrected isSupportedBindType() to behave as documented.stephan2022-05-23
| | | FossilOrigin-Name: 7e2d2e807272e98e9a3c9c9ba492b796a603f36b7cc12b16923cd8a9e6579851
* WASM: removed the in64-related bindings, as MDN says that calling a wasm ↵stephan2022-05-23
| | | | | function which has an int64 type in its signature will currently throw because JS has no 64-bit integer support. Those bindings now use doubles and simply hope that the user doesn't exceed their integer precision (2^53-1, approx 9 quadrillion). FossilOrigin-Name: 392e84828275ec203bc713d3a5d4790852add57539add6b29b5f6de1da2dc97a
* WASM: an arg handling fix for DB.exec({multi:true...}).stephan2022-05-22
| | | FossilOrigin-Name: 0d6332f706ec5c34cc6a9ff79878f4e10a9ad81b24cc7d743b52168586285811
* WASM: added exec(), execMulti(), and several getters. Various touchups and ↵stephan2022-05-22
| | | | | fixes. FossilOrigin-Name: b790c91b85e9cf8eecce86ac1717e8ccd2c3b6b98a1ad6a5d64eefc94ee86f9d
* Implemented Stmt.get() and friends for WASM OO #1 wrapper. Added basic tests ↵stephan2022-05-22
| | | | | for prepare/step/get. Restructured module init output to introduce only 1 global-scope symbol instead of 2. FossilOrigin-Name: 601dc3fa29c2ce2ede5a8320c79050305f3774b6d7bc759247c5021f3b74aaec
* WASM: added bindings for sqlite3_compileoption_get/used(), moved OO #1 into ↵stephan2022-05-22
| | | | | sqlite3-api.js since it can only be used from the same thread as that API and separating them complicates client-side use. Started adding test utilities and tests for the OO1 API. FossilOrigin-Name: f3bc0328c87cac7d50513b0f13576d8fe7b411396f19c08fbe7e7c657b33cfbf
* WASM OO wrapper #1: prepare() and bind() APIs are in place but are untested, ↵stephan2022-05-22
| | | | | pending fetch/get APIs. FossilOrigin-Name: 84c8f63a1c446331a3afe52b0c8bdfa6980f24aa4cf600f576877fef5e650c39
* Build refactoring for the fiddle/wasm bits. Set up wasm binding of a chunk ↵stephan2022-05-22
of the core C API and added some infastructure for creating test pages for it. FossilOrigin-Name: dea098b64eb95c395b346ebcae687afe42b7d21df48833527808c02226300a66