Repository navigation
fix: remove hardcoded 10-row limit from query output, add -n flag - #51
Merged
Merged
Conversation
codeasier
force-pushed
the
fix/query-output-truncation
branch
2 times, most recently
from
April 18, 2026 15:21
9d30243 to
27213dd
Compare
Query results were always truncated to first 10 rows with no way to retrieve the full list. Change default to unlimited output and add a -n flag to optionally limit displayed rows. Fixes #49
codeasier
force-pushed
the
fix/query-output-truncation
branch
from
April 18, 2026 15:30
27213dd to
d414ade
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 Description
pt-snap queryoutput was hardcoded to display only the first 10 results (results[:10]), making it impossible to retrieve full query results. This change:-nflag to optionally limit displayed rows (e.g.pt-snap query -n 5)-n <= 0means unlimited (same as not specifying it)-nwhen truncated🔗 Related Issue
Fixes #49
🧪 Testing
ruff check .,black --check .)test_completion.py)✅ Checklist
📸 Screenshots (if applicable)
Before (hardcoded 10-row limit):
After (default unlimited):
With
-n 5:📋 Additional Notes
Files changed:
src/pt_snap_cli/cli.py— display logicdocs/en/querying.md— output format documentationdocs/zh/querying.md— output format documentation (Chinese)