drh [Mon, 10 Nov 2025 23:40:40 +0000 (23:40 +0000)]
Revamp the internal data structures that the CLI uses for tracking and
managing the display mode. This is an incremental check-in. The code
compiles and runs, but not all tests are passing.
drh [Mon, 10 Nov 2025 15:56:18 +0000 (15:56 +0000)]
The ".www" command is now handled by QRF. So at this point, QRF handles
all query result formatting in the CLI and the legacy formatter has been
removed from the code.
stephan [Mon, 10 Nov 2025 07:41:54 +0000 (07:41 +0000)]
Reworking of JS internals to support binding of nested C structs (like sqlite3_index_constraint and friends) and allow some of the automated JS/C conversions to be plugged in at the struct-binding level, simplifying how struct members, in particular function pointers, can be used from JS.
stephan [Sun, 9 Nov 2025 06:32:10 +0000 (06:32 +0000)]
In sqlite3.wasm.allocFromTypedArray(), swap the order of the allocation and the access to the heap view object to work around an obscure issue when allocating huge blobs. The heap view object could previously become stale via the following allocation if the underlying WebAssembly.Memory object needed to grow. Essentially a realloc()-moves-the-pointer situation but it only comes up with huge allocations under the right circumstances and would trigger a JS exception (as opposed to corrupting the WASM heap). Problem reported in [forum:05b77273be104532|forum post 05b77273be104532].
drh [Sat, 8 Nov 2025 18:31:57 +0000 (18:31 +0000)]
Improvements to QRF_STYLE_Line. Make it responsive to mxTotalWidth and
mxRowHeight. Indent subsequent lines appropriately. Add corresponding
test cases.
drh [Fri, 7 Nov 2025 13:11:16 +0000 (13:11 +0000)]
Rename "mxWidth" to "mxColWidth". Add "mxTotalWidth" and "mxLength"
settings and hook them up to the TCL interface, but those settings are
not yet implemented.
drh [Thu, 6 Nov 2025 19:22:34 +0000 (19:22 +0000)]
Revamp so that Explain and Eqp styles force the statement into the
the appropriate explain-mode for the rendering and restore it afterwards.
Add the new scanstatus styles: Stats, StatsEst, and StatsVm.
drh [Wed, 5 Nov 2025 18:27:18 +0000 (18:27 +0000)]
The TCL interface for QRF is now feature complete (at least until I think
of new features to add). There is still a lot of testing, bug-fixing,
and documentation to be done, however.
drh [Wed, 5 Nov 2025 15:44:11 +0000 (15:44 +0000)]
New style setting QRF_STYLE_Auto which chooses box, explain, or EQP depending
on the statement to be rendered. Improvements to memory management.
Updates to the documentation.
drh [Wed, 5 Nov 2025 12:37:42 +0000 (12:37 +0000)]
New build product "tclsqlite-ex.c" is the tclsqlite.c file with QRF added.
This is now used whereever tclsqlite.c was used. Hence QRF is now in the
testfixture and in the tclextension. The sqlite3 method is "format". That
method is currently just a non-functional stub.
stephan [Wed, 5 Nov 2025 05:59:53 +0000 (05:59 +0000)]
TEA extension: add --tcl-stubs config flag, defaulting to zero, because there does not seem to be a universally-valid default for that. Addresses [forum:cd6503fce2|forum post cd6503fce2].
stephan [Tue, 4 Nov 2025 22:01:55 +0000 (22:01 +0000)]
Minor wasm build simplifications and extend the JS bindings of sqlite3_column/value_text() such that they include embeded NUL bytes in their result strings rather than truncate them at NUL. Consolidate the shell.c build flags from the canonical and autoconf makefiles into the configure script.
stephan [Mon, 3 Nov 2025 21:26:27 +0000 (21:26 +0000)]
Add new file missing from [936990cf067a5ebb] (and subsequently deleted by fossil clean -x). Have speedtest1 wasm use the user-provided sqlite3.c, rather than forcing the canonical one, so that the wasm exports don't have to be re-generated for that special case. Remove a harmless duplicate -D... flag.
drh [Mon, 3 Nov 2025 15:34:25 +0000 (15:34 +0000)]
Use the same compile-time options for the CLI in the auto-setup tarball
as are used in the canonical source tree.
[forum:/forumpost/8975130218|Forum post 8975130218].
stephan [Sat, 1 Nov 2025 14:49:05 +0000 (14:49 +0000)]
Fix ext/wasm/mkdist.sh to use ./version-info instead of ../../version-info (a recent build change made to ensure that builds with a custom sqlite3.c embed that version info).
drh [Fri, 31 Oct 2025 15:18:29 +0000 (15:18 +0000)]
Change the name of a file-scope constant array in carray.c so that it does
not conflict with other variables names in other files when carray.c is
amalgamated. This is down to resolve a harmless compiler warning.
stephan [Thu, 30 Oct 2025 21:11:01 +0000 (21:11 +0000)]
Add SQLITE_OMIT_WAL checks around some functions to avoid defining unused statics in such builds. Fixes OMIT_WAL builds on msys2 and passes tool/omittest-msvc.tcl.
stephan [Thu, 30 Oct 2025 20:18:20 +0000 (20:18 +0000)]
Simplify the EXPORTED_FUNCTIONS lists to use the preprocessor instead of per-list shell commands. (Unrelated) Remove part of the post-compilation JS filtering which breaks with emsdk 4.0.16+, which means the .js files are about 57kb bigger than they really ought to be.
stephan [Thu, 30 Oct 2025 18:46:03 +0000 (18:46 +0000)]
Add (void) to two places for the sake of SQLITE_OMIT_WAL builds. Why these do not complain on tests in this tree, but do on a downstream tree (same machine, same compiler), is a mystery.
drh [Thu, 30 Oct 2025 11:39:49 +0000 (11:39 +0000)]
Fix the CLI ".dump" command so that it does not make duplicate
sqlite_sequence table entries as described in
[forum:/forumpost/b1674b56ad|forum thread b1674b56ad].
stephan [Thu, 30 Oct 2025 02:21:38 +0000 (02:21 +0000)]
A experiment addressing the embedded-NUL behavior of sqlite3_colum/value_text() in the JS bindings, as discussed in [forum:d77281aec2df9ada|forum post d77281aec2]. This is an experiment only. It works, in that existing tests do not see the difference, but it has implicications which require careful consideration before deploying.
drh [Wed, 29 Oct 2025 20:47:01 +0000 (20:47 +0000)]
Fix a logic error introduced by [cea8bf79e18d55a8] which caused
"0 OR 2" to be evaluated as "2" instead of as "1". Problem reported at
[forum:/forumpost/d5f32040c5d50d2d|forum post d5f32040c].