Repository navigation
A small batch-export check: CSV on success, nonzero exit on SQL failure #285
cooldk
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I operate Kunavo. This AI-assisted exercise uses a copy of our public synthetic SQLite example to check litecli's batch-export boundary, rather than retelling its billing example.
With litecli 1.17.1, Python 3.12.13, and SQLite 3.53.4, I ran three separate CLI processes with a temporary explicit
--liteclirc:PRAGMA query_only=ON; SELECT ...produced CSV on stdout and exited 0. The integer values remained the strings300000000and200000000in the CSV.INSERTafter the same pragma was rejected, printed its error on stderr, and exited 1.An independent SQLite read and the file SHA-256 confirmed that the two original rows and database bytes were unchanged. Six assertions passed on December 5.
This makes a guarded export practical: write to a temporary output file and replace a previous report only after the command succeeds. Don't turn an error into an empty successful report by ignoring the exit status.
query_onlyis a connection setting, not an immutable file, sandbox or permission system. The check covers batch mode only, not interactive editing, completion or history. No customer database, credential, remote API or paid call was used.Complete synthetic-copy reproducer
Save the following as
litecli_query_only.py. It imports only the public teaching fixture, backs it up into a temporary database and uses isolated CLI configuration.All reactions