-
Notifications
You must be signed in to change notification settings - Fork 1
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
Support queries where outputs are not 1:1 with inputs #28
Conversation
2fa6696
to
0881219
Compare
This comment was marked as resolved.
This comment was marked as resolved.
6e882ab
to
cc4ea7a
Compare
cc4ea7a
to
ceeb017
Compare
It turns out that this PR is not a "feature request" it is actually a bug fix 🥇 My original implementation assumed that |
Hmm; if that's the case it might call for changing the |
For now, we definitely need to make |
The tricky bit is that JQ always returns a stream (0 or more) of json entities https://stackoverflow.com/a/69303619/1728133. A helpful intro https://github.com/pkoppstein/jq/wiki/A-Stream-oriented-Introduction-to-jq |
Indeed so. A more designed-to-purpose interface might return a seq, which would allow laziness as an implementation detail; as it is, though, returning an ArrayNode is returning a seqable, which this PR takes advantage of in the CLI implementation. |
Per #27. Implements a (slower)
MultiOutputContainer
that generates a JSON list of the query's results when given the active input, used when:multi true
is set.