Skip to content

Include status footer in paged output#1635

Open
rolandwalker wants to merge 1 commit intomainfrom
RW/include-status-footer-in-paged-output
Open

Include status footer in paged output#1635
rolandwalker wants to merge 1 commit intomainfrom
RW/include-status-footer-in-paged-output

Conversation

@rolandwalker
Copy link
Contributor

Description

  • Create a new postamble property in SQLResult representing nontabular footer output.
  • Refer to SQLResult properties directly more often, eliding temporary variables.
  • Convert some old-style SQLResult() constructors in the tests to named parameters.

Motivation: the status property to a SQLResult is not included in the paged output. This was noticeable in the output of the status command, which includes a non-tabular footer which is more naturally part of the paged output.

This suggests a few other changes, such as recasting SQLResult.title as SQLResult.preamble. The trailing line in #1628 would more naturally be a postamble than a status.

Checklist

  • I added this contribution to the changelog.md file.
  • I added my name to the AUTHORS file (or it's already there).
  • To lint and format the code, I ran
    uv run ruff check && uv run ruff format && uv run mypy --install-types .

@rolandwalker rolandwalker self-assigned this Feb 26, 2026
@github-actions
Copy link

Findings

  1. mycli/main.py:1007-1012 drops warning.postamble by passing None. If SHOW WARNINGS ever returns a postamble, it will be silently lost in the watch loop. Consider passing warning.postamble to keep behavior consistent with other format_output calls.

Missing Tests / Edge Cases

  1. No test asserts that SQLResult.postamble is appended after formatted output (and thus included in paged output). A focused test around format_output or the status command output would lock in the new behavior.

No security issues spotted in the changes.

@rolandwalker rolandwalker force-pushed the RW/include-status-footer-in-paged-output branch 2 times, most recently from 2b48c9d to 986be5f Compare February 26, 2026 11:19
 * create a new postamble property in SQLResult, representing
   nontabular footer output
 * refer to SQLResult properties directly more often, eliding temporary
   variables
 * convert some old-style SQLResult() constructors in the tests to
   named parameters

Motivation: the "status" _property_ to a SQLResult is not included in
the paged output.  This was noticeable in the output of the "status"
_command_, which includes a non-tabular footer which is more naturally
part of the paged output.

This suggests a few other changes, such as recasting SQLResult.title
as SQLResult.preamble.
@rolandwalker rolandwalker force-pushed the RW/include-status-footer-in-paged-output branch from 986be5f to ee1dd8a Compare February 26, 2026 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant