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

search: add preview and JSON options #1783

Closed
jqnatividad opened this issue Apr 29, 2024 · 1 comment · Fixed by #1790
Closed

search: add preview and JSON options #1783

jqnatividad opened this issue Apr 29, 2024 · 1 comment · Fixed by #1790
Labels
enhancement New feature or request

Comments

@jqnatividad
Copy link
Owner

jqnatividad commented Apr 29, 2024

Primarily for qsv pro, add a --preview-matches <arg> option.

This will return the first <arg> matching rows to stderr (which is unbuffered, and will immediately flush) while the rest of the input CSV is being scanned.

This will allow instantaneous return of the first N matches regardless of the size of the input file, as search will continue for the rest of the file.

The --json option supports the return the results in JSON format.

cc @rzmk @samibaig

@jqnatividad jqnatividad added the enhancement New feature or request label Apr 29, 2024
@jqnatividad
Copy link
Owner Author

jqnatividad commented Apr 29, 2024

Thinking about this more, the --preview-matches <arg> with having a double meaning, either as time elapsed (in ms) or number of rows, whichever comes first (default: 100).

We choose 100 as it seems to be the shortest perceivable application response delay per https://stackoverflow.com/questions/536300/what-is-the-shortest-perceivable-application-response-delay

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant