You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
address review: bare 'query' shows help, 'add' subcommand, list previews, SQL hints
- lrc query with no args now prints help (not the stats alias)
- promote add to a subcommand: lrc query add <name> "<sql>" (consistent with list/view/delete); removed --add/--name options
- lrc query list now shows a truncated SQL preview per alias
- on a failed query, append correct-usage examples (alias + raw SQL)
- query --help documents the ~/.lrc/queries.toml structure
- remove installer queries.toml writing: default aliases are built into the binary, so the installer change was unnecessary
LiveReview Pre-Commit Check: skipped (iter:1, coverage:0%)
returnfmt.Errorf("%w\n\nRun a saved alias or valid SQL, e.g.:\n lrc query stats\n lrc query \"SELECT * FROM review_log LIMIT 5\"\nSee 'lrc query --help' for the table schema and 'lrc query list' for aliases", err)
stats = "SELECT action AS Action, COUNT(*) AS Commits, ROUND(AVG(iterations),1) AS AvgIter, ROUND(AVG(coverage),1) AS AvgCoveragePct FROM review_log GROUP BY action ORDER BY Commits DESC"
660
-
by-author = "SELECT author AS Author, COUNT(*) AS Commits, SUM(action = 'reviewed') AS Reviewed FROM review_log GROUP BY author ORDER BY Commits DESC"
661
-
recent = "SELECT short_hash AS Hash, date AS Date, action AS Action, subject AS Subject FROM review_log ORDER BY date DESC LIMIT 20"
stats = "SELECT action AS Action, COUNT(*) AS Commits, ROUND(AVG(iterations),1) AS AvgIter, ROUND(AVG(coverage),1) AS AvgCoveragePct FROM review_log GROUP BY action ORDER BY Commits DESC"
541
-
by-author = "SELECT author AS Author, COUNT(*) AS Commits, SUM(action = 'reviewed') AS Reviewed FROM review_log GROUP BY author ORDER BY Commits DESC"
542
-
recent = "SELECT short_hash AS Hash, date AS Date, action AS Action, subject AS Subject FROM review_log ORDER BY date DESC LIMIT 20"
543
-
QUERIESEOF
544
-
echo -e "${GREEN}OK${NC} Wrote default query aliases to $LRC_QUERIES_FILE"
545
-
fi
546
-
547
532
# Helper: append source line to a shell rc file if not already present
0 commit comments