Commit Graph
11 Commits
Author SHA1 Message Date
Nicolas Williams 6f9646a44f Improve docs somewhat, inspired by #1326 2017-01-30 14:11:05 -06:00
Nicolas Williams bd7b48c1b9 Make |= delete LHS when RHS is empty (Fix #1314)
Now that #1313 is fixed, |= no longer outputs null when the RHS update
expression outputs empty.

When a user wants to keep the current value of the LHS they would have
the RHS update expression output `.`, so having `empty` achieve the same
thing would be redundant.  The obvious thing to do is to delete the LHS
when the RHS update outputs `empty` (i.e., doesn't output any values).

It's reasonable to think that existing programs won't be broken by this
change, because reduce and |= not handling empty well is clearly a bug.
(Though it's possible that some programs were using empty to quickly
terminate reduce or |=, it's not likely.  They should use label/break
instead.)

Prior to this change |= would use the _last_ value output by the RHS
update expression.  With this change |= will use the _first_ value
instead.  This change _is_ a minor backwards-incompatible change.  It
may or may not be acceptable; we'll see.  It is a useful change in that
it makes |= faster when the update expression produces multiple values.
2017-01-30 14:11:05 -06:00
Nicolas Williams 7bdf3a39ad Add SQL-style operators (#1322) 2017-01-30 14:11:05 -06:00
Nicolas Williams e24af3c78e reduce: handle empty updates (fix #1313) 2017-01-30 14:11:05 -06:00
David Tolnay 227f62e013 Rebuild jq.1.prebuilt 2015-07-24 09:01:21 -07:00
Evan Zacks 89244cc3ea fix references to --color-output 2015-07-24 10:18:12 -04:00
Nicolas Williams 9ae2d66d21 Remove remnants of --online-input option 2014-06-17 19:02:23 -05:00
Nicolas Williams 0c762925b2 Add -j / --join-output option, similar to -r
Fix #215.
2014-06-17 18:59:35 -05:00
Nicolas Williams cf7895876b Rebuild jq.1.prebuilt 2014-06-17 18:17:50 -05:00
Nicolas Williams 778ba9f7ab Update AUTHORS 2014-06-16 13:25:50 -05:00
Nicolas Williams 63dbac28ad Fix typo; rename jq.1-prebuit to jq.1.prebuilt 2014-06-13 19:04:06 -05:00