From: drh <> Date: Wed, 10 Dec 2025 15:50:23 +0000 (+0000) Subject: Test cases and documentation tweaks. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1debc25ef82281ef227523c3acbab54d7115cc1f;p=thirdparty%2Fsqlite.git Test cases and documentation tweaks. FossilOrigin-Name: cc9e47a205883aedf24b5e85e8e0499567f514780e3e6ec58069a39ea6270133 --- diff --git a/ext/qrf/README.md b/ext/qrf/README.md index 02672d67dc..09dc33d9a2 100644 --- a/ext/qrf/README.md +++ b/ext/qrf/README.md @@ -360,8 +360,9 @@ If the sqlite3_qrf_spec.nLineLimit setting is non-zero, then the formatter will only display the first nLineLimit lines of each value. It does not matter if the value is split because it contains a newline character, or if it split by wrapping. This setting merely limits -the number of displayed lines. This setting only works for -**Box**, **Column**, **Line**, **Markdown**, and **Table** styles. +the number of displayed lines. The nLineLimit setting currently only +works for **Box**, **Column**, **Line**, **Markdown**, and **Table** +styles, though that limitation might change in future releases. The idea behind both of these settings is to prevent large renderings when doing a query that (unexpectedly) contains very large text or @@ -375,8 +376,10 @@ subqueries or complex expressions. If those columns lack an AS clause, then the name of the column will be a copy of the expression that defines the column, which in some queries can be hundreds of characters and multiple lines in length, which can reduce the readability -of tabular displays. An nTitleLimit somewhere in the range of 10 to -20 can improve readability. +of tabular displays. An nTitleLimit somewhere in the range of 10 to 20. +can improve readability. The nTitleLimit setting currently only +works for **Box**, **Column**, **Line**, **Markdown**, and **Table** +styles, though that limitation might change in future releases. ### 2.9 Word Wrapping In Columnar Styles (nWrap, bWordWrap) diff --git a/manifest b/manifest index d7936a1c35..2cdb6025bd 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Add\sthe\snTitleLimit\soption\sto\sQRF.\s\sAlso\schange\s"line"\sstyle\sso\sthat\sit\nuses\szColumnSep\sas\sthe\sdivider\sbetween\sthe\stitle\sand\sthe\svalue. -D 2025-12-10T15:24:46.290 +C Test\scases\sand\sdocumentation\stweaks. +D 2025-12-10T15:50:23.298 F .fossil-settings/binary-glob 61195414528fb3ea9693577e1980230d78a1f8b0a54c78cf1b9b24d0a409ed6a x F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea @@ -416,7 +416,7 @@ F ext/misc/wholenumber.c 0fa0c082676b7868bf2fa918e911133f2b349bcdceabd1198bba5f6 F ext/misc/windirent.h 02211ce51f3034c675f2dbf4d228194d51b3ee05734678bad5106fff6292e60c F ext/misc/zipfile.c d792ed9b936ddfe9a210ecc893352afaee306c63b084187f6e44951f6f669e21 F ext/misc/zorder.c bddff2e1b9661a90c95c2a9a9c7ecd8908afab5763256294dd12d609d4664eee -F ext/qrf/README.md af1c7faf239625cf27a3a0e8c9d78af4e0da8e4d887223141182bc87bfbd22c8 +F ext/qrf/README.md ea2cfe3526cb39d1f32c4537499a403e100aff16bda796cb92254b63d913de4e F ext/qrf/dev-notes.md e68a6d91ce4c7eb296ef2daadc2bb79c95c317ad15b9fafe40850c67b29c2430 F ext/qrf/qrf.c 03191b452a83aa970f43f0e3bac25082e1f5b71da5cab2f547789fa5fb0fbf28 F ext/qrf/qrf.h 2ac14b0aaacf44636d8c81051bfeab4afae50a98fbb2e10ff5aed0c28a87b2b2 @@ -1511,7 +1511,7 @@ F test/printf2.test 3f55c1871a5a65507416076f6eb97e738d5210aeda7595a74ee895f2224c F test/progress.test ebab27f670bd0d4eb9d20d49cef96e68141d92fb F test/ptrchng.test ef1aa72d6cf35a2bbd0869a649b744e9d84977fc F test/pushdown.test 46a626ef1c0ca79b85296ff2e078b9da20a50e9b804b38f441590c3987580ddd -F test/qrf01.test c464a5c72bcb11377d25ba955bfde47eae6332e1c00fcc97a6a1ca996d8fe11b +F test/qrf01.test 1d69175c966a95c7b2897a1831ca49ba84afc1107b32f7c455e05125ac7c8d11 F test/qrf02.test 39b4afdc000bedccdafc0aecf17638df67a67aaa2d2942865ae6abcc48ba0e92 F test/qrf03.test e7efe46d204671726b4707585126cd78d107368de4a7d0c7b8d5157cdd8624ed F test/qrf04.test 0894692c998d2401dcc33449c02051b503ecce0c94217be54fb007c82d2d1379 @@ -2184,11 +2184,8 @@ F tool/version-info.c 33d0390ef484b3b1cb685d59362be891ea162123cea181cb8e6d2cf6dd F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7 F tool/warnings.sh d924598cf2f55a4ecbc2aeb055c10bd5f48114793e7ba25f9585435da29e7e98 F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P f88e1d03573f394fc7caf60704c96152717b3fe8be4eef0caeb64737054f0fd2 -R ffbc5a3c90afd01d69ca06bdb0522a1b -T *branch * title-limit -T *sym-title-limit * -T -sym-trunk * +P d67a299c86ff80ed67857d2546b0edaf852cb23dbfbc15e24793d1c4860a2e50 +R a03c26d5a24ae4297a17dfee933f5deb U drh -Z 42a92002f07a36f7c65671dbf43f2ad5 +Z 2f472d15015dd4b2a2794b3cb6c59a6f # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index 84481c3f43..dd87f21734 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -d67a299c86ff80ed67857d2546b0edaf852cb23dbfbc15e24793d1c4860a2e50 +cc9e47a205883aedf24b5e85e8e0499567f514780e3e6ec58069a39ea6270133 diff --git a/test/qrf01.test b/test/qrf01.test index 8cf080b645..2eb189b0bf 100644 --- a/test/qrf01.test +++ b/test/qrf01.test @@ -657,7 +657,7 @@ value = x'00000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000 000000000000000000000000000000' } -do_test 5.2 { +do_test 5.2a { set sql {SELECT name, mtime, datetime(mtime,'unixepoch') AS time, value FROM t1 ORDER BY mtime} set result "\n[db format -style line -screenwidth 60 -blob sql \ @@ -686,6 +686,38 @@ value = x'00000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000 ... } +set sqlnolabel "SELECT name, mtime, datetime(mtime,'unixepoch'),\ + value FROM t1 ORDER BY mtime" +do_test 5.2b { + set result "\n[db format -style line -screenwidth 60 -blob sql \ + -text plain -esc off -textjsonb no -titlelimit 12 \ + -wordwrap yes -linelimit 3 $sqlnolabel ]" +} { + name: sample-jsonb + mtime: 1333101221 +datetime(...: 2012-03-30 09:53:41 + value: x'cc7c57616c706861b535332e31313638383732334762 + 657461c73071726657696474685072696e7428702c2070 + 2d3e704f75742c202d702d3e752e734c696e652e6d7843 + ... + + name: one + two + three + mtime: 1333206973 +datetime(...: 2012-03-31 15:16:13 + value: + + name: entry-one + mtime: 1708791504 +datetime(...: 2024-02-24 16:18:24 + value: x'00000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000 + ... +} +set sql "SELECT name, mtime, datetime(mtime,'unixepoch') AS time,\ + value FROM t1 ORDER BY mtime" do_test 5.3a { set result "\n[db format -style box -widths {0 10 10 14}\ -align {left right right center} \ @@ -710,6 +742,29 @@ do_test 5.3a { ╰──────────────┴────────────┴────────────┴────────────────╯ } do_test 5.3b { + set result "\n[db format -style box -widths {0 10 0 14} \ + -align {left right right center} \ + -blob sql -titlelimit 12 \ + -text plain -esc off -textjsonb no \ + -wordwrap yes -linelimit 2 $sqlnolabel ]" +} { +╭──────────────┬────────────┬─────────────────────┬────────────────╮ +│ name │ mtime │ datetime(... │ value │ +╞══════════════╪════════════╪═════════════════════╪════════════════╡ +│ sample-jsonb │ 1333101221 │ 2012-03-30 09:53:41 │ x'cc7c57616c70 │ +│ │ │ │ 6861b535332e31 │ +│ │ │ │ ... │ +├──────────────┼────────────┼─────────────────────┼────────────────┤ +│ one │ 1333206973 │ 2012-03-31 15:16:13 │ │ +│ two │ │ │ │ +│ ... │ │ │ │ +├──────────────┼────────────┼─────────────────────┼────────────────┤ +│ entry-one │ 1708791504 │ 2024-02-24 16:18:24 │ x'000000000000 │ +│ │ │ │ 00000000000000 │ +│ │ │ │ ... │ +╰──────────────┴────────────┴─────────────────────┴────────────────╯ +} +do_test 5.3c { set result "\n[db format -style table -widths {0 10 10 14}\ -align {center right right right} \ -blob sql \