Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect handling of --limit 0 #41

Open
john-aws opened this issue Feb 8, 2018 · 0 comments
Open

Incorrect handling of --limit 0 #41

john-aws opened this issue Feb 8, 2018 · 0 comments

Comments

@john-aws
Copy link

john-aws commented Feb 8, 2018

It would be helpful to support --limit 0. This would allow the user to request zero records output, and consequently the user could use this option to get the column headers, and only the column headers.

Currently --limit 0 behaves identically to --limit -1 (the default) which outputs all records. This behavior (outputting all records when limit is zero) is actually a by-product of another minor bug, which is the following test:

if n == limit:
    break

This test happens after n has been incremented and consequently will never break when limit is zero.

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

No branches or pull requests

1 participant