]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Adjust QRF to generate lower-case HTML output with the SQLITE_STYLE_Html master
authordrh <>
Tue, 14 Jul 2026 17:02:47 +0000 (17:02 +0000)
committerdrh <>
Tue, 14 Jul 2026 17:02:47 +0000 (17:02 +0000)
style setting.

FossilOrigin-Name: 4be8630e053de91fb03c960d792960e837cf6360d5d24fbae4fc97b8fcaef062

ext/qrf/README.md
ext/qrf/qrf.c
ext/qrf/qrf.h
manifest
manifest.uuid
test/qrf01.test

index fed33a57603cfe10f2f41cf07b5c1bae489aacab..03d816da79dd3447ad881db11e9f0d35929b840d 100644 (file)
@@ -633,7 +633,7 @@ The following output modes are currently defined:
 #define QRF_STYLE_Csv       4 /* Comma-separated-value */
 #define QRF_STYLE_Eqp       5 /* Format EXPLAIN QUERY PLAN output */
 #define QRF_STYLE_Explain   6 /* EXPLAIN output */
-#define QRF_STYLE_Html      7 /* Generate an XHTML table */
+#define QRF_STYLE_Html      7 /* Generate HTML-style <tr><td> output */
 #define QRF_STYLE_Insert    8 /* Generate SQL "insert" statements */
 #define QRF_STYLE_Json      9 /* Output is a list of JSON objects */
 #define QRF_STYLE_JObject  10 /* Independent JSON objects for each row */
@@ -724,7 +724,7 @@ with hard-coded values for some of the sqlite3_qrf_spec settings:
 </table>
 
 The **Html** style generates HTML table content, just without
-the `<TABLE>..</TABLE>` around the outside.
+the `<table>..</table>` around the outside.
 
 The **Insert** style generates a series of SQL "INSERT" statements
 that will inserts the data that is output into a table whose name is defined
index 6df8a8b47b45c916e91fb3c7e0e8c3dac1588bc4..614fa23008e1ec5b9a392743a9f0d15a45d306dc 100644 (file)
@@ -2604,13 +2604,13 @@ static void qrfSimpleTitle(Qrf *p){
   switch( p->spec.eStyle ){
     case QRF_STYLE_Html: {
       int i;
-      sqlite3_str_append(p->pOut, "<TR>", 4);
+      sqlite3_str_append(p->pOut, "<tr>", 4);
       for(i=0; i<p->nCol; i++){
         const char *zCName = sqlite3_column_name(p->pStmt, i);
-        sqlite3_str_append(p->pOut, "\n<TH>", 5);
+        sqlite3_str_append(p->pOut, "\n<th>", 5);
         qrfEncodeText(p, p->pOut, zCName);
       }
-      sqlite3_str_append(p->pOut, "\n</TR>\n", 7);
+      sqlite3_str_append(p->pOut, "\n</tr>\n", 7);
       break;
     }
     case QRF_STYLE_Quote:
@@ -2666,12 +2666,12 @@ static void qrfOneSimpleRow(Qrf *p){
       if( p->nRow==0 && p->spec.bTitles>=QRF_Yes ){
         qrfSimpleTitle(p);
       }
-      sqlite3_str_append(p->pOut, "<TR>", 4);
+      sqlite3_str_append(p->pOut, "<tr>", 4);
       for(i=0; i<p->nCol; i++){
-        sqlite3_str_append(p->pOut, "\n<TD>", 5);
+        sqlite3_str_append(p->pOut, "\n<td>", 5);
         qrfRenderValue(p, p->pOut, i);
       }
-      sqlite3_str_append(p->pOut, "\n</TR>\n", 7);
+      sqlite3_str_append(p->pOut, "\n</tr>\n", 7);
       qrfWrite(p);
       break;
     }
index 104c439d8ebdc5e986800447db04c334c802898e..fd88a8286d9e43afa92d4e285e736ca221da42b3 100644 (file)
@@ -87,7 +87,7 @@ int sqlite3_format_query_result(
 #define QRF_STYLE_Csv       4 /* Comma-separated-value */
 #define QRF_STYLE_Eqp       5 /* Format EXPLAIN QUERY PLAN output */
 #define QRF_STYLE_Explain   6 /* EXPLAIN output */
-#define QRF_STYLE_Html      7 /* Generate an XHTML table */
+#define QRF_STYLE_Html      7 /* Generate HTML-style <tr><td> output */
 #define QRF_STYLE_Insert    8 /* Generate SQL "insert" statements */
 #define QRF_STYLE_Json      9 /* Output is a list of JSON objects */
 #define QRF_STYLE_JObject  10 /* Independent JSON objects for each row */
index 65d6165df031c158e7de5cbf5a11ed864cea19e0..0598b7a4cf3c0af58c581fc302ffa796834c74e7 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Remove\sharmless\s"breakpoint"\scommand\sinserted\sby\sthe\sprevious\scheck-in
-D 2026-07-14T14:52:25.300
+C Adjust\sQRF\sto\sgenerate\slower-case\sHTML\soutput\swith\sthe\sSQLITE_STYLE_Html\nstyle\ssetting.
+D 2026-07-14T17:02:47.865
 F .fossil-settings/binary-glob 61195414528fb3ea9693577e1980230d78a1f8b0a54c78cf1b9b24d0a409ed6a x
 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
@@ -423,10 +423,10 @@ F ext/misc/wholenumber.c e41953e078894e66a0ff05dd6c76a61f904828c9a4620c7255fac26
 F ext/misc/windirent.h 02211ce51f3034c675f2dbf4d228194d51b3ee05734678bad5106fff6292e60c
 F ext/misc/zipfile.c 5cf901996c840b32a5c03d947c4ee86bda166f6e595a41871840df8520458054
 F ext/misc/zorder.c bddff2e1b9661a90c95c2a9a9c7ecd8908afab5763256294dd12d609d4664eee
-F ext/qrf/README.md 3dfd5de860cdc0c572d8926ba0c1b3cc8925487dfbda10e63af66a8811907687
+F ext/qrf/README.md e87f6420a0518a9c15957f3b91fcd7ba774f7641adf56310e408a4e96ed07811
 F ext/qrf/dev-notes.md e68a6d91ce4c7eb296ef2daadc2bb79c95c317ad15b9fafe40850c67b29c2430
-F ext/qrf/qrf.c 93b66548739454b837e0450ceba9b67484b3f9f4589a4ba73169ef9f1e2627d1
-F ext/qrf/qrf.h fcbc33578176b2fd9dda8310d8f6ba4eaf4f75052f466dfe682802e6664df8bd
+F ext/qrf/qrf.c a4b11f21ce066043a642273a3a72e6ea4ee40cc6a6c51f47cf9c914fdda730db
+F ext/qrf/qrf.h 457ab1299039fca5d591246be924eb328397df0d4be35d3a193d78e9c7874b4a
 F ext/rbu/rbu.c 801450b24eaf14440d8fd20385aacc751d5c9d6123398df41b1b5aa804bf4ce8
 F ext/rbu/rbu1.test 25870dd7db7eb5597e2b4d6e29e7a7e095abf332660f67d89959552ce8f8f255
 F ext/rbu/rbu10.test 7c22caa32c2ff26983ca8320779a31495a6555737684af7aba3daaf762ef3363
@@ -1534,7 +1534,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 a55372af3e0ac0a8f0cf4b4113c9f9d6621631ab0f5894e869a0d5759826b486
+F test/qrf01.test c5bf2300788e22ebfb6aa3a6ea299ba55e38766a7a8b4ecce4c7a0e36a8ef40d
 F test/qrf02.test 39b4afdc000bedccdafc0aecf17638df67a67aaa2d2942865ae6abcc48ba0e92
 F test/qrf03.test e7efe46d204671726b4707585126cd78d107368de4a7d0c7b8d5157cdd8624ed
 F test/qrf04.test 0894692c998d2401dcc33449c02051b503ecce0c94217be54fb007c82d2d1379
@@ -2214,8 +2214,8 @@ F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee
 F tool/warnings.sh a554d13f6e5cf3760f041b87939e3d616ec6961859c3245e8ef701d1eafc2ca2
 F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
 F tool/winmain.c 00c8fb88e365c9017db14c73d3c78af62194d9644feaf60e220ab0f411f3604c
-P a48f4cf312b8a1af03b1dc61d8475fc7448fb927e2573fa98882e7b14c065c65
-R 40d7697e090903955b24e5c10b0cae35
+P 5a4b0b81de1abf9c1b73f026b416b29b9bdddc7a1b73ae5b9aa02f3dde131731
+R 5ca5451ceba84a0338aad30cb6fcd699
 U drh
-Z 1ddddc6d9e8710b0c0c58eb7807be7ad
+Z c5c16572b72ca5414518d30654f89f2d
 # Remove this line to create a well-formed Fossil manifest.
index ff3e1993d297e63bc546ec412c8e6d4105675b06..bb3401bd614705939b34c67baff447414e0ccc23 100644 (file)
@@ -1 +1 @@
-5a4b0b81de1abf9c1b73f026b416b29b9bdddc7a1b73ae5b9aa02f3dde131731
+4be8630e053de91fb03c960d792960e837cf6360d5d24fbae4fc97b8fcaef062
index 9f6ea8e10f152030042cafe8f98e7b9707d0f0f9..c0e21a45210b238da7970487ba570f427e3aaa12 100644 (file)
@@ -307,35 +307,35 @@ do_test 1.63.0 {
 do_test 1.70 {
   set result "\n[db format -style html {SELECT * FROM t1}]"
 } {
-<TR>
-<TD>1
-<TD>2.5
-<TD>three
-</TR>
-<TR>
-<TD>BLOB
-<TD>null
-<TD>Ἀμήν
-</TR>
+<tr>
+<td>1
+<td>2.5
+<td>three
+</tr>
+<tr>
+<td>BLOB
+<td>null
+<td>Ἀμήν
+</tr>
 }
 do_test 1.71 {
   set result "\n[db format -style html -title auto {SELECT * FROM t1}]"
 } {
-<TR>
-<TH>a
-<TH>b
-<TH>c
-</TR>
-<TR>
-<TD>1
-<TD>2.5
-<TD>three
-</TR>
-<TR>
-<TD>BLOB
-<TD>null
-<TD>Ἀμήν
-</TR>
+<tr>
+<th>a
+<th>b
+<th>c
+</tr>
+<tr>
+<td>1
+<td>2.5
+<td>three
+</tr>
+<tr>
+<td>BLOB
+<td>null
+<td>Ἀμήν
+</tr>
 }
 do_test 1.72 {
   set result "\n[db format -style html {
@@ -343,22 +343,22 @@ do_test 1.72 {
             'ab>cd' AS c, 'ab"cd' AS d,
             'xy''z' AS e}]"
 } {
-<TR>
-<TD>ab&lt;cd
-<TD>ab&amp;cd
-<TD>ab&gt;cd
-<TD>ab&quot;cd
-<TD>xy&#39;z
-</TR>
+<tr>
+<td>ab&lt;cd
+<td>ab&amp;cd
+<td>ab&gt;cd
+<td>ab&quot;cd
+<td>xy&#39;z
+</tr>
 }
 do_test 1.73 {
   set result "\n[db format -style html -rowcount on {SELECT * FROM t1 WHERE a=1}]"
 } {
-<TR>
-<TD>1
-<TD>2.5
-<TD>three
-</TR>
+<tr>
+<td>1
+<td>2.5
+<td>three
+</tr>
 <!-- 1 row -->
 }
 do_test 1.74 {
@@ -369,21 +369,21 @@ do_test 1.74 {
 do_test 1.75 {
   set result "\n[db format -style html -title always -rowcount on {SELECT * FROM t1 WHERE a=2}]"
 } {
-<TR>
-<TH>a
-<TH>b
-<TH>c
-</TR>
+<tr>
+<th>a
+<th>b
+<th>c
+</tr>
 <!-- 0 rows -->
 }
 do_test 1.76 {
   set result "\n[db format -style html -title always -rowcount off {SELECT * FROM t1 WHERE a=2}]"
 } {
-<TR>
-<TH>a
-<TH>b
-<TH>c
-</TR>
+<tr>
+<th>a
+<th>b
+<th>c
+</tr>
 }
 
 do_test 1.80 {