Skip to content

Incorrect handling of --limit 0 #41

Open
@john-aws

Description

@john-aws

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions