Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
docs
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
docs
Commits
b3a1fe1f
Commit
b3a1fe1f
authored
Apr 02, 2016
by
Tobias Schmidt
Committed by
Brian Brazil
May 24, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Document complement set operator "unless"
parent
81b85fcd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
operators.md
content/docs/querying/operators.md
+7
-2
No files found.
content/docs/querying/operators.md
View file @
b3a1fe1f
...
...
@@ -78,6 +78,7 @@ These logical/set binary operators are only defined between instant vectors:
*
`and`
(intersection)
*
`or`
(union)
*
`unless`
(complement)
`vector1 and vector2`
results in a vector consisting of the elements of
`vector1`
for which there are elements in
`vector2`
with exactly matching
...
...
@@ -88,6 +89,10 @@ over from the left-hand-side vector.
(label sets + values) of
`vector1`
and additionally all elements of
`vector2`
which do not have matching label sets in
`vector1`
.
`vector1 unless vector2`
results in a vector consisting of the elements of
`vector1`
for which there are no elements in
`vector2`
with exactly matching
label sets. All matching elements in both vectors are dropped.
## Vector matching
Operations between vectors attempt to find a matching element in the right-hand-side
...
...
@@ -211,8 +216,8 @@ highest to lowest.
1.
`*`
,
`/`
,
`%`
2.
`+`
,
`-`
3.
`==`
,
`!=`
,
`<=`
,
`<`
,
`>=`
,
`>`
4.
`
AND`
,
`UNLESS`
5.
`
OR
`
4.
`
and`
,
`unless`
5.
`
or
`
Operators on the same precedence level are left-associative. For example,
`2 * 3 % 2`
is equivalent to
`(2 * 3) % 2`
.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment