1
0
mirror of https://github.com/sqlite/sqlite.git synced 2026-10-23 21:49:02 +03:00
Commit Graph

27 Commits

Author SHA1 Message Date
drh
a9940a8503 Fix a problem in QRF when the screen width is narrower than a column.
[bugs:/info/2026-10-23T03:50:28Z|Bug 2026-10-23T03:50:28Z]

FossilOrigin-Name: 8de43901c796964bfc7943261fe639874e395ec9415970e4e6a5d1c4868d18a8
2026-10-23 11:55:02 +00:00
drh
154360f1cd Fix a regression in the CLI's handling of control characters in CSV output,
caused by [d0fe92e0ce8662b9].
[bugs:/info/2026-10-18T20:38:57Z|Bug 2026-10-18T20:38:57Z].

FossilOrigin-Name: 2146eab561d153b70eb41c54bb122ea8d2dc0ad983f00639aa2f65fd3a64e603
2026-10-19 19:15:13 +00:00
drh
853288469d The default floating point format for JSON and INSERT output modes
should be "%!0.17" to preserve full binary→text→binary round-trips
with no loss of precision.
[bugs:/info/2026-10-18T20:37:23Z|Bug 2026-10-18T20:37:23Z].

FossilOrigin-Name: c31221e954bcca2e6505338446635d0efb809f453008c4927441ebd6f0e1b873
2026-10-19 14:34:34 +00:00
drh
10586997d9 Fix the ".dump" command in the CLI so that it is not affected by
mode settings like --fpfmt, --ifmt, or --textjsonb.
[bugs:/info/2026-10-18T20:39:22Z|/info/2026-10-18T20:39:22Z]

FossilOrigin-Name: a9d8123e27fa71bf7d29ec4cc7aa997f5e94de3c5b48907ccb7242795e44144c
2026-10-19 12:02:08 +00:00
drh
8e1b59b6dc Enhance QRF to deal with zero-length column names.
Also make use of the new sqlite3_str_free() interface.
[bugs:/info/2026-10-17T09:26:21Z|Bug 2026-10-17T09:26:21Z]

FossilOrigin-Name: d3e004fe3daeb01085e969890beb56fe71839bcad0e7a19e1690a1b2d14b2775
2026-10-17 11:13:08 +00:00
drh
ed9745eb7f Fix "csv" output mode in the CLI so that it responds to --colsep and --rowsep
as it should.
[forum:/info/2026-10-12T17:59:34Z|Forum post 2026-10-12T17:59:34Z].

FossilOrigin-Name: d0fe92e0ce8662b9f3391769e4602a5495c2c69591ded7d4e464e90517c1f407
2026-10-13 02:14:25 +00:00
drh
e8cbe2c96a In QRF, add the zero-pad flag to the default floating-point format in
output modes that render JSON or INSERT, so that infinities are shown
as 9e999 or similar instead of as "Inf".
[bugs:/info/2026-10-04T05:35:43Z|Bug 2026-10-04T05:35:43Z]

FossilOrigin-Name: f63139ba68bc7df770bbd3c26bcd760c479889fb45fa921e9e225e38c9e2044c
2026-10-04 16:23:01 +00:00
drh
9da2d2374a The --escape mode for CSV should default to "off".
[bugs:/info/2026-09-23T16:25:07Z|Bug 2026-09-23T16:25:07Z]

FossilOrigin-Name: c356641fadf591bcf312ae9657ddc84e483a06aa068eb2d3021467435cbad0c1
2026-09-23 21:04:57 +00:00
drh
3d18207a6f Fix typos. Turn off -fpfmt and -ifmt using "auto" instead of "default".
FossilOrigin-Name: 530b55da56326f4816d43893d05f57b10541605a9508b0b37c46df21ecd22b76
2026-08-15 12:22:31 +00:00
drh
c799c15dbe Refactor "realfmt"→"fpfmt" and "intfmt"→"ifmt".
FossilOrigin-Name: 17277813d101187d85755b7bad3f1c95380335021e13ee368be0add0c8c346b3
2026-08-15 10:10:17 +00:00
drh
a6a26aa3f5 Fix an off-by-one bug in --intfmt. Add some test cases.
FossilOrigin-Name: 4e86fc1922e347825e1160652a2d5e6c60d04eabe847621b08f03b05b66904ea
2026-08-14 16:34:00 +00:00
drh
d1e066bf3f Initial code for an enhancement to QRF that allows for app-defined format
strings used to render integer and floating-point values.

FossilOrigin-Name: 067083e973b195f50fa0d199e24a3b01d1b2780a0812fda63d3747c4c75662bf
2026-08-14 15:57:32 +00:00
drh
839d781501 Make the (legacy, deprecated) ".header" command in the CLI responsive to
the "always" title mode.  Clean up title mode and define its operation with
improved comments in the TCL interface and in the CLI.  Add the
"-title auto" option to the CLI.

FossilOrigin-Name: f94259fc07cd7856e9c6f81a46689f4f96bbf464fda7f1d11b51a308c296aca0
2026-07-08 15:34:53 +00:00
drh
3d0c7ce2aa Change the CLI so that the default "--title" is "always" instead of "on"
for some display modes.  This check-in also include a fix to "--title always"
for the "markdown" display mode.

FossilOrigin-Name: c3b0fff1b76b8c354b34fef17ff639968698e97234d6ab7af15e0e1a835486e9
2026-07-07 14:53:53 +00:00
drh
9c202c32c1 Improved title separator in QRF when using "-title always" on an empty row.
Improved comments on the mode matrix in the CLI code.  Additional test
cases.

FossilOrigin-Name: a102d28fca6376da670b274d3d733da2c73da9abe3e7128defd04b4015b03a48
2026-07-07 12:24:50 +00:00
drh
dc4cb53863 Show --rowcount for "--style insert". New test cases.
FossilOrigin-Name: 386c40e3a9706111542b7f336e82f7bb6e9f43c6056185f9f3bd9aae1159070a
2026-07-07 11:00:10 +00:00
drh
8e409df984 Add new option "bRowCount" to QRF. Add QRF_Always as a possibility for
bTitles.  Use these feature to enhance ".mode psql" to be a better
approximation of what psql actually does.

FossilOrigin-Name: 600c6b464050078b38cc688668148f684243e7c5f08d0aae4d5f72aa6f985482
2026-07-06 19:24:15 +00:00
drh
2315f282be Fix QRF so that it works sensibly with "--wrap 1"
FossilOrigin-Name: 48f950b2a1ef841d915ca733baf324a1af98e644b660f238dd5018015340a6c6
2026-05-26 13:54:57 +00:00
drh
abc82c49c2 Revamp the QRF insert-mode optimization of [659ff6ab55802507]. The
control value is now nMultiInsert.  Multiple rows are added to each INSERT
statement until the number of bytes in that statement exceeds the
nMultiInsert value.  The CLI uses a default value of 3000, which provides
a good balance between speed and prepare-statement size.  The output
from ".dump" now loads nearly 2x faster in some cases.

FossilOrigin-Name: 55b0ce9f93d68b17a18423f0f751b778573127743a2bac67abfea074ac32d41a
2026-03-10 18:13:13 +00:00
drh
efa8633fd8 Enhance QRF with the mxTuple field, which if greater than 1 causes the
QRF_STYLE_Insert style to group as many as mxTuple adjacent rows into
a single INSERT statement.  The field is accessible using the -mxtuple
option in the TCL interface, and the --mxtuple option in ".mode".  The
output of the ".dump" and ".fullschema" commands responds to the current
--mxtuple setting.

FossilOrigin-Name: 659ff6ab5580250707908af003ecd093bd5313f03f21f0efd000a7aff6638b3c
2026-03-10 14:02:03 +00:00
drh
e795890d7e In QRF, fix line-wrap indentation for "line" mode when using a
non-standard column separator.

FossilOrigin-Name: 00c96cca3de709e40207feb9c10a94e38e7857c9bc01938849c6c5daee7148c7
2026-03-09 13:53:58 +00:00
drh
03c0ac435e Enhance QRF so that it terminates more quickly if it encounters an OOM
or oversize string error, and fix it so that it reports such errors.

FossilOrigin-Name: ebedeb6169cc3bc3708130d4061065af600a8851e896fc3eeaf33c8c83fe3b95
2026-01-07 16:19:18 +00:00
drh
db4d8946ef Verify the effect of "--titles on" in the "insert" mode in the CLI.
FossilOrigin-Name: a5f922b0832d9544b083f3d55d4029aa80e320bf5505547c5a1ddb21f4685e3e
2025-12-31 20:43:31 +00:00
drh
f395df1307 The header setting from the legacy ".headers" dot-command takes precedence
over the current ".mode" setting, for backwards compatibility.
[forum:/forumpost/2025-12-31T19:14:24z|Forum post 2025-12-31T19:14:24z].

FossilOrigin-Name: d2c5df41285a9c8a66e9bdea4e28d86fe10665ad01cfbab5a7ce43b8e39b4e34
2025-12-31 20:35:16 +00:00
drh
6693e78772 Test cases for .import, as well as minor enhancements to .import and to .check.
FossilOrigin-Name: 0252ac1c946cd2101f0084f11951b1aeea330dea23b707934c8852d9abe136b9
2025-12-28 21:37:58 +00:00
drh
93ecf30068 CLI: The .imposter command matches the index name regardless of case.
Minor fixes to .check.

FossilOrigin-Name: 989ebba9ad263abafeddaf4a0e3e1275e83a3a12d7f95c7a451ecf8cbd64a583
2025-12-16 13:43:35 +00:00
drh
5266818aed In the CLI, if a command-line argument names a file and the filename ends
with .sql or .txt, then process that file as an SQL script.  Use this
feature for better testing.

FossilOrigin-Name: 19cc0522e2255f21f6fb6af1442c2ba122fdd4deacd9ea2c181ce9e597b88770
2025-12-13 21:11:49 +00:00