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

Result mode – line #12

Open
V0ldek opened this issue Sep 15, 2022 · 0 comments
Open

Result mode – line #12

V0ldek opened this issue Sep 15, 2022 · 0 comments
Labels
acceptance: go ahead Reviewed, implementation can start area: result Improvements in query result reporting help wanted External contributions welcome type: feature New feature or request
Milestone

Comments

@V0ldek
Copy link
Member

V0ldek commented Sep 15, 2022

Is your feature request related to a problem? Please describe.
The current implementation focuses on quickly returning locations of matches. The output is not human-readable though – we either get an aggregate of the number of hits or byte values. A first attempt at getting something that could be used as a simple CLI query tool (without focusing on massive datasets, or considering sparse results) would be to output the line number and the line at which a match is made.

Describe the solution you'd like
The implementation should be completely outside of the engine itself – we don't want it to influence the throughput of the main solution in any way. This is already achieved with the QueryResult trait.

As an example output, if I try to run the query $.a..c on the document:

{
    "a": {
        "b": {
            "c": [
                42,
                17,
                {
                    "c": "hello"
                }
            ],
    }
}

we expect to get an output resembling

4 |             "c": [
8 |                     "c": "hello"

Additional context
This obviously only makes sense for non-compressed JSON documents, but that's not something we can easily influence.

@V0ldek V0ldek added type: feature New feature or request help wanted External contributions welcome acceptance: go ahead Reviewed, implementation can start labels Sep 15, 2022
@V0ldek V0ldek self-assigned this Sep 15, 2022
@V0ldek V0ldek added this to the v1.0.0 milestone Sep 15, 2022
@V0ldek V0ldek changed the title Result mode – line Result mode – line Sep 15, 2022
@V0ldek V0ldek removed their assignment Sep 15, 2022
@V0ldek V0ldek added area: result Improvements in query result reporting mod: engine labels Nov 23, 2022
@V0ldek V0ldek modified the milestones: v1.0.0, v1.1.0 Jun 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
acceptance: go ahead Reviewed, implementation can start area: result Improvements in query result reporting help wanted External contributions welcome type: feature New feature or request
Projects
Development

No branches or pull requests

1 participant