diff options
author | Nicolas Williams <nico@cryptonector.com> | 2017-01-27 10:06:04 -0600 |
---|---|---|
committer | Nicolas Williams <nico@cryptonector.com> | 2017-01-30 14:11:05 -0600 |
commit | 7bdf3a39ade47c0571bda45c639a8fc0f11d0ca6 (patch) | |
tree | dba867b62a0fbda30a9f7265d018c061ba014e29 /docs | |
parent | 396543191cec32f69712b4364d26a0ebaa61b801 (diff) |
Add SQL-style operators (#1322)
Diffstat (limited to 'docs')
-rw-r--r-- | docs/content/3.manual/manual.yml | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/docs/content/3.manual/manual.yml b/docs/content/3.manual/manual.yml index 94aa2476..ae7a9d39 100644 --- a/docs/content/3.manual/manual.yml +++ b/docs/content/3.manual/manual.yml @@ -1835,6 +1835,46 @@ sections: input: '"2015-03-05T23:51:47Z"' output: ['1425599507'] + - title: "SQL-Style Operators" + body: | + + jq provides a few SQL-style operators. + + * INDEX(stream; index_expression): + + This builtin produces an object whose keys are computed by + the given index expression applied to each value from the + given stream. + + * JOIN($idx; stream; idx_expr; join_expr): + + This builtin joins the values from the given stream to the + given index. The index's keys are computed by applying the + given index expression to each value from the given stream. + An array of the value in the stream and the corresponding + value from the index is fed to the given join expression to + produce each result. + + * JOIN($idx; stream; idx_expr): + + Same as `JOIN($idx; stream; idx_expr; .)`. + + * JOIN($idx; idx_expr): + + This builtin joins the input `.` to the given index, applying + the given index expression to `.` to compute the index key. + The join operation is as described above. + + * IN(s): + + This builtin outputs `true` if `.` appears in the given + stream, otherwise it outputs `false`. + + * IN(source; s): + + This builtin outputs `true` if any value in the source stream + appears in the second stream, otherwise it outputs `false`. + - title: Conditionals and Comparisons entries: - title: "`==`, `!=`" |