From 630b111cd32deace472c0cb7513ab13246d36d38 Mon Sep 17 00:00:00 2001 From: drh <> Date: Wed, 29 Oct 2025 11:19:04 +0000 Subject: [PATCH] Documentation tweaks. Change the name of the eQuote setting to eText for consistency. FossilOrigin-Name: 612326750155ff15c9a73fde938aa035490cdd95b364452c1e6b19b521508dfe --- ext/qrf/README.md | 24 ++++++++++++------------ ext/qrf/qrf-tester.c | 4 ++-- ext/qrf/qrf.c | 20 ++++++++++---------- ext/qrf/qrf.h | 6 +++--- manifest | 18 +++++++++--------- manifest.uuid | 2 +- 6 files changed, 37 insertions(+), 37 deletions(-) diff --git a/ext/qrf/README.md b/ext/qrf/README.md index 000709efd1..fd30bc49ee 100644 --- a/ext/qrf/README.md +++ b/ext/qrf/README.md @@ -41,7 +41,7 @@ struct sqlite3_qrf_spec { unsigned char eFormat; /* Output format */ unsigned char bShowCNames; /* True to show column names */ unsigned char eEscape; /* How to deal with control characters */ - unsigned char eQuote; /* Quoting style for text */ + unsigned char eText; /* Quoting style for text */ unsigned char eBlob; /* Quoting style for BLOBs */ unsigned char bWordWrap; /* Try to wrap on word boundaries */ unsigned char bTxtJsonb; /* Render JSONB blobs as JSON text */ @@ -95,12 +95,12 @@ output format describes below for additional detail. Other fields in sqlite3_qrf_spec may be used or may be ignored, depending on the value of eFormat. -### 2.4 Show Column Names +### 2.4 Show Column Names (bShowCNames) The sqlite3_qrf_spec.bShowCNames field is a boolean. If true, then column names appear in the output. If false, column names are omitted. -### 2.5 Control Character Escapes +### 2.5 Control Character Escapes (eEscape) The sqlite3_qrf_spec.eEscape determines how ASCII control characters are formatted when displaying TEXT values in the result. These are the allowed @@ -114,7 +114,7 @@ values: If the value of eEscape is zero, then the control character with value X is displayed as ^Y where Y is X+0x40. Hence, a -backspace character (U+0008) is shown as "^H". This is an excellent +backspace character (U+0008) is shown as "^H". This is the default. If eEscape is one, then control characters in the range of U+0001 @@ -130,9 +130,9 @@ The TAB (U+0009), LF (U+000a) and CR-LF (U+000d,U+000a) character sequence are always output literally and are not mapped to alternative display values, regardless of this setting. -### 2.6 How to escape TEXT values +### 2.6 Display of TEXT values (eText) -The sqlite3_qrf_spec.eQuote field can have one of the following values: +The sqlite3_qrf_spec.eText field can have one of the following values: > ~~~ #define QRF_TXT_Off 0 /* Literal text */ @@ -171,11 +171,11 @@ A value of QRF_TXT_Json gives similar results as QRF_TXT_Tcl except that the rules are adjusted so that the displayed string is strictly conforming the JSON specification. -### 2.7 How to escape BLOB values (eBlob and bTxtJsonb) +### 2.7 How to display BLOB values (eBlob and bTxtJsonb) If the sqlite3_qrf_spec.bTxtJsonb flag is true and if the value to be displayed is JSONB, then the JSONB is translated into text JSON and the -text is shown according to the sqlite3_qrf_spec.eQuote setting as +text is shown according to the sqlite3_qrf_spec.eText setting as described in the previous section. If the bTxtJsonb flag is false (the usual case) or if the BLOB value to @@ -183,7 +183,7 @@ be displayed is not JSONB, then the sqlite3_qrf_spec.eBlob field determines how the BLOB value is formatted. The following options are available; > ~~~ -#define QRF_BLOB_Auto 0 /* Determine BLOB quoting using eQuote */ +#define QRF_BLOB_Auto 0 /* Determine BLOB quoting using eText */ #define QRF_BLOB_Text 1 /* Display content exactly as it is */ #define QRF_BLOB_Sql 2 /* Quote as an SQL literal */ #define QRF_BLOB_Hex 3 /* Hexadecimal representation */ @@ -192,11 +192,11 @@ how the BLOB value is formatted. The following options are available; ~~~ A value of QRF_BLOB_Auto means that display format is selected automatically -by sqlite3_format_query_result() based on eFormat and eQuote. +by sqlite3_format_query_result() based on eFormat and eText. A value of QRF_BLOB_Text means that BLOB values are interpreted as UTF8 text and are displayed using formatting results set by eEscape and -eQuote. +eText. A value of QRF_BLOB_Sql means that BLOB values are shown as SQL BLOB literals: a prefix "`x'`" following by hexadecimal and ending with a @@ -307,7 +307,7 @@ The sqlite3_format_query_result() function (which calls xRender) will take responsibility for freeing the string returned by xRender after it has finished using it. -The eQuote, eBlob, and eEscape settings above become no-ops if the xRender +The eText, eBlob, and eEscape settings above become no-ops if the xRender routine returns non-NULL. In other words, the application-supplied xRender routine is expected to do all of its own quoting and formatting. diff --git a/ext/qrf/qrf-tester.c b/ext/qrf/qrf-tester.c index 4226782daf..8e7d178f8f 100644 --- a/ext/qrf/qrf-tester.c +++ b/ext/qrf/qrf-tester.c @@ -219,7 +219,7 @@ int main(int argc, char **argv){ sqlite3_free(sqlite3_str_finish(pMsg)); } }else - if( strncmp(zLine, "--eQuote=", 9)==0 ){ + if( strncmp(zLine, "--eText=", 9)==0 ){ const struct { const char *z; int e; } aQuote[] = { { "csv", QRF_TXT_Csv }, { "html", QRF_TXT_Html }, @@ -231,7 +231,7 @@ int main(int argc, char **argv){ int i; for(i=0; ispec.eQuote ){ + switch( p->spec.eText ){ case QRF_TXT_Sql: { sqlite3_str_appendf(pOut, "%Q", zTxt); break; @@ -552,7 +552,7 @@ static void qrfEncodeText(Qrf *p, sqlite3_str *pOut, const char *zTxt){ case '\r': sqlite3_str_append(pOut, "\\r", 2); break; case '\t': sqlite3_str_append(pOut, "\\t", 2); break; default: { - if( p->spec.eQuote==QRF_TXT_Json ){ + if( p->spec.eText==QRF_TXT_Json ){ sqlite3_str_appendf(pOut, "\\u%04x", z[i]); }else{ sqlite3_str_appendf(pOut, "\\%03o", z[i]); @@ -1492,18 +1492,18 @@ static void qrfInitialize( } case QRF_MODE_Json: { p->spec.zColumnSep = ","; - p->spec.eQuote = QRF_TXT_Json; + p->spec.eText = QRF_TXT_Json; p->spec.eBlob = QRF_BLOB_Json; p->spec.zNull = "null"; break; } case QRF_MODE_Html: { - p->spec.eQuote = QRF_TXT_Html; + p->spec.eText = QRF_TXT_Html; p->spec.zNull = "null"; break; } case QRF_MODE_Insert: { - p->spec.eQuote = QRF_TXT_Sql; + p->spec.eText = QRF_TXT_Sql; p->spec.eBlob = QRF_BLOB_Sql; if( p->spec.zTableName==0 || p->spec.zTableName[0]==0 ){ p->spec.zTableName = "tab"; @@ -1512,14 +1512,14 @@ static void qrfInitialize( } case QRF_MODE_Csv: { p->spec.eFormat = QRF_MODE_List; - p->spec.eQuote = QRF_TXT_Csv; + p->spec.eText = QRF_TXT_Csv; p->spec.eBlob = QRF_BLOB_Tcl; p->spec.zColumnSep = ","; p->spec.zRowSep = "\r\n"; break; } case QRF_MODE_Quote: { - p->spec.eQuote = QRF_TXT_Sql; + p->spec.eText = QRF_TXT_Sql; p->spec.eBlob = QRF_BLOB_Sql; p->spec.zColumnSep = ","; p->spec.zRowSep = "\n"; @@ -1535,7 +1535,7 @@ static void qrfInitialize( */ p->spec.eFormat = QRF_MODE_Quote; p->spec.bShowCNames = 1; - p->spec.eQuote = QRF_TXT_Sql; + p->spec.eText = QRF_TXT_Sql; p->spec.eBlob = QRF_BLOB_Sql; p->spec.zColumnSep = ","; p->spec.zRowSep = "\n"; @@ -1552,7 +1552,7 @@ static void qrfInitialize( */ p->spec.eFormat = QRF_MODE_Quote; p->spec.bShowCNames = 1; - p->spec.eQuote = QRF_TXT_Sql; + p->spec.eText = QRF_TXT_Sql; p->spec.eBlob = QRF_BLOB_Sql; p->spec.zColumnSep = ","; p->spec.zRowSep = "\n"; @@ -1561,7 +1561,7 @@ static void qrfInitialize( } } if( p->spec.eBlob==QRF_BLOB_Auto ){ - switch( p->spec.eQuote ){ + switch( p->spec.eText ){ case QRF_TXT_Sql: p->spec.eBlob = QRF_BLOB_Sql; break; case QRF_TXT_Csv: p->spec.eBlob = QRF_BLOB_Tcl; break; case QRF_TXT_Tcl: p->spec.eBlob = QRF_BLOB_Tcl; break; diff --git a/ext/qrf/qrf.h b/ext/qrf/qrf.h index f4e8a42e3c..fe799b2ab8 100644 --- a/ext/qrf/qrf.h +++ b/ext/qrf/qrf.h @@ -24,7 +24,7 @@ struct sqlite3_qrf_spec { unsigned char eFormat; /* Output format */ unsigned char bShowCNames; /* True to show column names */ unsigned char eEscape; /* How to deal with control characters */ - unsigned char eQuote; /* Quoting style for text */ + unsigned char eText; /* Quoting style for text */ unsigned char eBlob; /* Quoting style for BLOBs */ unsigned char bWordWrap; /* Try to wrap on word boundaries */ unsigned char bTxtJsonb; /* Render JSONB blobs as JSON text */ @@ -81,7 +81,7 @@ int sqlite3_format_query_result( /* ** Quoting styles for text. -** Allowed values for sqlite3_qrf_spec.eQuote +** Allowed values for sqlite3_qrf_spec.eText */ #define QRF_TXT_Off 0 /* Literal text */ #define QRF_TXT_Sql 1 /* Quote as an SQL literal */ @@ -94,7 +94,7 @@ int sqlite3_format_query_result( ** Quoting styles for BLOBs ** Allowed values for sqlite3_qrf_spec.eBlob */ -#define QRF_BLOB_Auto 0 /* Determine BLOB quoting using eQuote */ +#define QRF_BLOB_Auto 0 /* Determine BLOB quoting using eText */ #define QRF_BLOB_Text 1 /* Display content exactly as it is */ #define QRF_BLOB_Sql 2 /* Quote as an SQL literal */ #define QRF_BLOB_Hex 3 /* Hexadecimal representation */ diff --git a/manifest b/manifest index fbbc68b341..ff741582a3 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Add\ssupport\sfor\sthe\sbTxtJsonb\sflag\sin\ssqlite3_qrf_spec,\swhich\sif\strue\scauses\nJSONB\sblobs\sto\sbe\sdisplayed\sas\sJSON\stext. -D 2025-10-28T22:25:24.967 +C Documentation\stweaks.\s\sChange\sthe\sname\sof\sthe\seQuote\ssetting\sto\seText\sfor\nconsistency. +D 2025-10-29T11:19:04.940 F .fossil-settings/binary-glob 61195414528fb3ea9693577e1980230d78a1f8b0a54c78cf1b9b24d0a409ed6a x F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea @@ -416,10 +416,10 @@ F ext/misc/wholenumber.c 0fa0c082676b7868bf2fa918e911133f2b349bcdceabd1198bba5f6 F ext/misc/windirent.h 02211ce51f3034c675f2dbf4d228194d51b3ee05734678bad5106fff6292e60c F ext/misc/zipfile.c 09e6e3a3ff40a99677de3c0bc6569bd5f4709b1844ac3d1c1452a456c5a62f1c F ext/misc/zorder.c bddff2e1b9661a90c95c2a9a9c7ecd8908afab5763256294dd12d609d4664eee -F ext/qrf/README.md 8e0763e34c97c288c8e913f8984c89c270aa9f681a9fc389320b3e36cdf7ea4f -F ext/qrf/qrf-tester.c 25b5c71fecde6053d7c49e91de578b15b09f370cc9d2db0de3bc55251da9fe45 -F ext/qrf/qrf.c 221937b10e5ced56a4bbdeae940b75f4c71776827910a34cd0b3168374e4eaec -F ext/qrf/qrf.h 70d3e5b24c22bb14a19cdc2121aeff6a4054e29541e14dcb4750c0cfba6078c2 +F ext/qrf/README.md eed6b838d175133845c296946704dba1a520edc2ca342a717c4e0b3bbbc279db +F ext/qrf/qrf-tester.c 7f6300f453c8f18cf67eb932782a091b7f8b17d97bf04bf2fc4ee9d836ac4f54 +F ext/qrf/qrf.c f0fbb2001c812e12fe7d09e025c0bcba07055c9b07959ba0ff8983b85ad9038a +F ext/qrf/qrf.h 8bfc1d366289d4e603534387f4abf330f30c793092292a610932e074aceda749 F ext/rbu/rbu.c 801450b24eaf14440d8fd20385aacc751d5c9d6123398df41b1b5aa804bf4ce8 F ext/rbu/rbu1.test 25870dd7db7eb5597e2b4d6e29e7a7e095abf332660f67d89959552ce8f8f255 F ext/rbu/rbu10.test 7c22caa32c2ff26983ca8320779a31495a6555737684af7aba3daaf762ef3363 @@ -2175,8 +2175,8 @@ F tool/version-info.c 33d0390ef484b3b1cb685d59362be891ea162123cea181cb8e6d2cf6dd F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7 F tool/warnings.sh 1ad0169b022b280bcaaf94a7fa231591be96b514230ab5c98fbf15cd7df842dd F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P d00c549126ca96b061e537dfabb93b02824e3a9b8fa0c9135a96cf060262206e -R eb84edc720870a58624028e0ab77bb61 +P 3fcf9ecb039a903cefcf4eeaf43974de0cbd48d899dc189b8f70c3745addc11a +R e9aaf7cf4bd5afd48dd614b11ebf167f U drh -Z 008d48891a8df1ef5b5f2498f9433818 +Z f49b32220e1ae28c461c3583de771e18 # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index 83386db706..bbc3514edc 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -3fcf9ecb039a903cefcf4eeaf43974de0cbd48d899dc189b8f70c3745addc11a +612326750155ff15c9a73fde938aa035490cdd95b364452c1e6b19b521508dfe -- 2.47.3