Task: Add a default sqliterc with formatting and ergonomic defaults

Table of Contents

This page documents a task in the SQLite CLI quality-of-life setup story. It captures the goal, current status, acceptance, and any notes or results.

Goal

A committed, fully-commented projects/ores.sql/utility/sqliterc.sql that the sqlite3 shell can load to get headed box output, wide non-wrapping columns, a visible NULL marker, query timing, and connection-level safety defaults.

Status

Field Value
State DONE
Parent story SQLite CLI quality-of-life setup
Now Complete — merged in PR #804.
Waiting on Nothing.
Next Land via PR.
Last touched 2026-05-24

Acceptance

  • .mode box --wrap 0 so long values render on one line (verified).
  • .headers on, .nullvalue '∅', .timer on, .changes on.
  • PRAGMA foreign_keys = ON and PRAGMA busy_timeout = 5000 active.
  • Every active entry is commented; journal_mode left commented with rationale.
  • sqlite3 -init projects/ores.sql/utility/sqliterc.sql loads cleanly.

Plan

Reproduce the wrapping complaint against the installed sqlite3 to find the real lever (.mode box --wrap 0) rather than guessing, and verify each dot-command is real before commenting it. Then rewrite the rc file in sections — output formatting, ergonomics, session pragmas, handy levers — with a comment on every active entry, enabling only per-connection settings and leaving persistent ones commented. Finish by smoke-testing with sqlite3 -init.

Notes

  • Removed the original .alias example — .alias is not a real sqlite3 dot-command (verified against 3.46.1).
  • Plain .mode box was confirmed to wrap long values even when no ~/.sqliterc is present; --wrap 0 disables it.

PRs

PR Title
#804 [sql,agile] SQLite shell quality-of-life config (.sqliterc)

Result

rc file written and smoke-tested with sqlite3 -init: a long value renders on a single full-width line, NULL shows as , PRAGMA foreign_keys reports 1, and PRAGMA busy_timeout reports 5000. No load errors.

Emacs 29.1 (Org mode 9.6.6)