1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-12-21 13:38:01 +03:00
Commit Graph

5468 Commits

Author SHA1 Message Date
drh
dd3b30ec85 Columnar modes respond to nScreenWidth.
FossilOrigin-Name: 60d26ebb4d91cc885b6b938ef2fc2864ebbf5a18d2e456521ee2f4aa3b22eddf
2025-11-15 15:18:41 +00:00
drh
18c7b4d651 Columnar formats respond to --screenwidth restrictions by removing
cell padding.

FossilOrigin-Name: cbe233ca131118692fd4a84d8fcf0dfca926fa935f66cfb718c235d54084de3d
2025-11-15 12:09:13 +00:00
drh
3338ca5f56 Data structure improvements on columnar layout. Prep work for getting
columnar layouts to respond to nScreenWidth.

FossilOrigin-Name: 777eeb2ed2708faf42559387bd582b9345a794798a0327e4fcd75e37948eac60
2025-11-15 11:28:23 +00:00
drh
7a0d5bdd29 Improve columnar layout in QRF so that it correctly deals with control
characters, and especially tabs.

FossilOrigin-Name: 0650e2b83170b44c1ba944259a96d41e1a14a57004d4f1f80dc5640ae837a81e
2025-11-15 00:23:09 +00:00
drh
c2b9896e50 Enforce the --charlimit constraint in QRF.
FossilOrigin-Name: c25f8fdedd8d68e3551a445e24e1c60e105e18f9cf8f1badcbb77a58974f3381
2025-11-14 21:40:20 +00:00
drh
9a3561e2d9 Merge the latest trunk enhancements into the qrf branch.
FossilOrigin-Name: 9ee892b4f97c91208a658f09add00a567406e913edb022a2fd53333ea01c2b26
2025-11-14 20:11:15 +00:00
stephan
e1f7ec65fd Slight restructure of the previous checkin.
FossilOrigin-Name: 8ff98747c072c8c333b1b37cf4ec9344e84f081bd4e6d3b5e75f37b1e1ce9e84
2025-11-14 17:23:24 +00:00
stephan
505d8a43db In sqlite3-api-cleanup.js, if no Emscripten module is detected then simply return, rather than throw. This should enable the generated sqliet3-api.js (normally an intermediary file) to be used as-is, with the caveat that the caller has to bootstrap the library themselves.
FossilOrigin-Name: d64c9cd4c7a1ffe04de6c75126563d7bbb24266e13d41406f6d55720b8199037
2025-11-14 16:56:51 +00:00
stephan
408c991017 Remove a harmless duplicated makefile var assignment from mkwasmbuilds.c.
FossilOrigin-Name: 4b4a6fbe20d51689e0abc65beed078bbb9418383e69eb8ec13f0657e2cf13bfd
2025-11-14 15:03:55 +00:00
drh
a7b9a10707 Fix harmless compiler warnings. Incorporate "USAGE:" comments on dot-command
implementations into the CLI ".help" command output.

FossilOrigin-Name: 046bfab4a01e8a7cc58d1bdf0756c90ba354562d79e5453c08202daf648e76a6
2025-11-14 14:59:43 +00:00
stephan
09cc9b5184 Fix a makefile ordering bug which caused certain builds to fail unless others had already been built. Remove the superfluous sqlite3-node.wasm from the final deliverables dir (sqlite3-node.mjs uses sqlite3.wasm instead).
FossilOrigin-Name: fd70088284946b9d4315781b3f68133cc0abd4244247f2fce04044feab8a97c0
2025-11-14 14:42:00 +00:00
drh
d5ee8aa625 Fix various bugs and compiler warnings. All tests now passing on linux, mac,
and windows.  More testing needed, though.

FossilOrigin-Name: 2220cb70c2f1ee30dcdf917a20feacdfcb3789433d0645fea626fd4c5cf0d099
2025-11-14 13:07:45 +00:00
drh
c4f198bfc4 Merge all the latest trunk enhancements into the qrf branch.
FossilOrigin-Name: 97b06e58ed128a1d60b89437ddf0ad80df528b8dbfdb6a7637374fc1ab4ddb10
2025-11-14 02:27:58 +00:00
stephan
388c1da56e Generic makefile cleanups and doc updates.
FossilOrigin-Name: e8b34b4178be621102dac165b716283055fad90b3edc2394f56a24f9f0149448
2025-11-13 17:37:40 +00:00
stephan
9e6474c5a8 Internal doc fix (renamed file).
FossilOrigin-Name: cb8fb01fe19ba3af536a662aed894b2b0eb2463c8d34c644c498234fd82122f3
2025-11-13 16:38:45 +00:00
stephan
319870836c JS code reformatting and doc updates. No functional changes.
FossilOrigin-Name: c566c653e4f55afa0660e819ed5b1fd96cb9b24bc78c333adcd8825331a9dd26
2025-11-13 15:33:44 +00:00
stephan
a9025a5f1a Add the #include -raw flag to ext/wasm/c-pp-lite.c to support a pending feature.
FossilOrigin-Name: 42c30c314969c0f2573bbe36615683ac19a7ba4e30004c7080873459096caaf5
2025-11-13 14:47:41 +00:00
stephan
57a533a7c3 mkwasmbuilds.c doc updates. Merge in the parts of [8611cf643b] which are not contentious.
FossilOrigin-Name: cb0f0e22241aae65938b4bc7a1b809088466a17cee80344f66ee889a76c422c1
2025-11-13 09:03:48 +00:00
stephan
f47095a5a0 Teach c-pp to export its argv as a #define list so that we can embed it in the generates files.
FossilOrigin-Name: 42f95ea71e5e7e927685de3a6da2ede38abe7cabdd1fc71b9a14bebe9f54a65e
2025-11-13 08:26:11 +00:00
stephan
ce53b80819 Minor doc correction and a JS error message tweak.
FossilOrigin-Name: c4ae21c89e5fd40eefd4916df6c6a6c4e27075a434a9d47576d3fcfbc7720588
2025-11-13 06:49:12 +00:00
drh
b9a471a745 More details on the format of the QRF_STYLE_Json and QRF_STYLE_JOBject.
FossilOrigin-Name: 2b22321df9c2f51e4b0ab9e4da859c58bb3f194ad69c22b9d32b35831740f9dd
2025-11-12 19:03:05 +00:00
stephan
b867030b1a Clarify that 'pikchr' is not a typo.
FossilOrigin-Name: d7bb2ee6ec23c266c887fb2aeb77b0b17cd8f1429564d341537f57c5478410e2
2025-11-12 17:25:17 +00:00
drh
3b847a4040 Rename QRF_STYLE_JsonLine to QRF_STYLE_JObject. Add new convenience modes
to the CLI and generally refactor and improve the ".mode" command.  Some
tests are failing, mostly due to changes in error message output and similar.

FossilOrigin-Name: 4c8109682e3a224fd8e015e73a9c1c7b6d56ad747d7ca7bc387bb92e1c98f731
2025-11-12 12:44:02 +00:00
drh
b43e8920d8 Minor refactoring of some field names in the sqlite3_qrf_spec object, to try
to make the names more intuitive, memorable, and succinct.

FossilOrigin-Name: 3450bc7eecb717abedbaeb56dc824e14eb35ed30322fe3dd3b4b1cbd5fd14c60
2025-11-11 18:07:42 +00:00
drh
7f947dbd6c Move the ".output" command into a separate subroutine. Enhance .output so
that it is able to capture output in a sqlite3_str object, then compare that
captured output we patterns to accomplish tests.

FossilOrigin-Name: ddd167044753f5215624fc9ee0e3657836c528f23a6a3e262401fd1b64cdbb21
2025-11-11 14:08:50 +00:00
drh
71b65c5055 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.

FossilOrigin-Name: 8cc581e53c2ab15bd311e082048b7c57b03a754d25c0b4beead08a3362ac1c7a
2025-11-10 23:40:40 +00:00
drh
0c4c0dbc7d Keep explicit NULL values in QRF_STYLE_Json output.
FossilOrigin-Name: cb07f3d441b0b2a3ebdfaa9456891a9c8e33fa07b967532a9edfaf6ff3163cb0
2025-11-10 22:05:42 +00:00
drh
dfeb788b0f Merge all the latest trunk improvements into the qrf branch.
FossilOrigin-Name: 1fc2298edc67cbaf1963ed858a36cab15f670c00779ace6b63bdd266b0dbaaf2
2025-11-10 20:11:36 +00:00
drh
09f16c5ab6 Add the bTextNull field to sqlite3_qrf_spec. Use QRF to implement "tcl"
mode in the CLI.

FossilOrigin-Name: 2ba92320db3c16c3c91e29ea935ae92da546261f25846d242bd2dd27e0b7e032
2025-11-10 12:32:04 +00:00
drh
a79f685533 Fix a missing va_end() call in the intckMprintf() function of the
incremental integrity-check extension.

FossilOrigin-Name: 62ad2350e368dc337ba2d0fb6847d07c40a6f79520dd6414d22b5b54983b0b12
2025-11-10 11:05:36 +00:00
drh
f863c0187c Merge all the latest trunk fixes, and especially the fix for the ".www"
command in the CLI, into the qrf branch.

FossilOrigin-Name: 07a5523cf27fd7c1d8fbc5cde80cb45fadef49317ca59fec9f8e42b2839c3e19
2025-11-10 10:46:55 +00:00
stephan
73caea1764 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.
FossilOrigin-Name: bb4fd5b789cebf2b224c29023fea3e620a86fb36730c36c0d85d9f35880bf643
2025-11-10 07:41:54 +00:00
drh
7f28c6d64e Enforce mxRowHeight in columnar layouts. Code clean-up. Minimum column with
is 2 if there is wrapping, in case there are double-wide characters.

FossilOrigin-Name: 0ee8fc00af4c82da0d597c65dd3d8590c71ea78d8f4a29653bbb21668c6c530d
2025-11-09 17:25:23 +00:00
stephan
c55d8262cf 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].
FossilOrigin-Name: 0f712b6b0516dc151d3bcbb63497661c82e11eae368e639bbdf197e1b3467195
2025-11-09 06:32:10 +00:00
drh
c1aac60386 Fixes for harmless static analyzer warnings.
FossilOrigin-Name: 37bd136ae842c8f8110c10b0834c804a8af133ce0caff492f37bd567a56ac6c6
2025-11-09 00:37:29 +00:00
drh
edc34bf866 Name changes. QRF_TEXT_Off becomes QRF_TEXT_Plain. mxTotalWidth becomes
nScreenWidth.

FossilOrigin-Name: 871567e377e976e0bb191d466019d1d4abe126f2da1880f1e25cd92b06a666d1
2025-11-08 22:46:29 +00:00
drh
bfa8c7d370 Improvements to QRF_STYLE_Line. Make it responsive to mxTotalWidth and
mxRowHeight.  Indent subsequent lines appropriately.  Add corresponding
test cases.

FossilOrigin-Name: 23ddc38cf19845a385c8b33002805c3c864ab9b2e36c3d609794444b06d20c89
2025-11-08 18:31:57 +00:00
drh
44aea46a07 Fix minor issues with alignment and quoting. All legacy tests are now
passing.

FossilOrigin-Name: 712b890531d351cf19d57d8cc6dced5cdd2c394d69fd1ace98298d79ddca269a
2025-11-08 17:08:19 +00:00
drh
96e47e16e7 Miscellaneous fixes to the new alignment configurations.
FossilOrigin-Name: 787fb4c2ac80db6552bc7a740c3c3c63c0c8414cb4e7db80d367b4b5512519d0
2025-11-08 15:25:07 +00:00
drh
22d6a48ba7 Separate column width specification from cell alignment.
FossilOrigin-Name: 5dadfd7f41764ddfed39bb49bbde3a54d8f282bb494c9c2abbba37d0995a7f8e
2025-11-08 14:04:29 +00:00
drh
ca111b06f3 Minor changes to fix a few legacy test cases. Snapshot prior to yet another
refactor.

FossilOrigin-Name: b429e7882fd630a490350efa38bfce8686d6727f324a60191337a59d5436828b
2025-11-08 10:48:55 +00:00
drh
e8cd0ee61f Make sure columnar outputs always invoke qrfWrite().
FossilOrigin-Name: 21084041196dd6908bb810d8fce80b7f6d5b12ebe474bf62b85128540ad020eb
2025-11-08 03:44:05 +00:00
drh
6eb5f5d9a7 Rewrite the table layout in QRF. Easier to maintain now. Still a few
shell test failures, but much better after this rewrite.

FossilOrigin-Name: 25838d282c5f7a922988245f373edfe8adbe28e929abce83afcda2b08472e685
2025-11-08 03:20:47 +00:00
drh
d2424338b0 Incremental check-in. QRF is working, but there are many test failures
in the shell test modules.

FossilOrigin-Name: de7fc9afc43d4bd5f5995832cd698633e0e7213c190fa044856c9f82512161f9
2025-11-07 17:48:14 +00:00
drh
a6b4039050 Begin the process of integrating QRF into the CLI. Adjust makefiles.
Include the QRF code in shell.c.  But QRF is not yet used by the CLI.

FossilOrigin-Name: 7596fc32b371e5e657e830c2e80e61b0947320a7359833e915a888a438c2e935
2025-11-07 14:31:17 +00:00
drh
eedf226700 Update documentation to clarify that mxTotalWidth and mxLength are not
yet implemented.

FossilOrigin-Name: c25806fc5491554f1cd55174c6cf98b509d619e3011b8e26abdf05b24133a6e8
2025-11-07 13:23:29 +00:00
drh
84c03d6c36 Rename "mxWidth" to "mxColWidth". Add "mxTotalWidth" and "mxLength"
settings and hook them up to the TCL interface, but those settings are
not yet implemented.

FossilOrigin-Name: 3f327e8fbc295b43c79118f8f49f8d2e20c2f3ac96e3b7f996720dab858d8199
2025-11-07 13:11:16 +00:00
drh
10747754d4 Add the JsonLine output style.
FossilOrigin-Name: 7dfba841cfc515ac28401c4eb90ec24e04fd52cddaeae41be3cfa6967dac0eac
2025-11-07 12:12:02 +00:00
drh
04586681af Put the style constants in alphabetic order. Improvements to
documentation.

FossilOrigin-Name: d5e891426f8b2a0c3326bf868f2d811c44a1f7e619f42b273c7445ab443d618c
2025-11-06 23:34:30 +00:00
drh
099f7f052b 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.

FossilOrigin-Name: 128f1149076ef00c567405ea2112be0ae665b12e81672ae5494d82af11633af5
2025-11-06 19:22:34 +00:00