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
cbde8e57
Commit
cbde8e57
authored
Apr 07, 2016
by
Tobias Schmidt
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #373 from prometheus/document-unless
Document complement set operator "unless"
parents
1cd80c7d
c98c79c7
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 @
cbde8e57
...
@@ -78,6 +78,7 @@ These logical/set binary operators are only defined between instant vectors:
...
@@ -78,6 +78,7 @@ These logical/set binary operators are only defined between instant vectors:
*
`and`
(intersection)
*
`and`
(intersection)
*
`or`
(union)
*
`or`
(union)
*
`unless`
(complement)
`vector1 and vector2`
results in a vector consisting of the elements of
`vector1 and vector2`
results in a vector consisting of the elements of
`vector1`
for which there are elements in
`vector2`
with exactly matching
`vector1`
for which there are elements in
`vector2`
with exactly matching
...
@@ -88,6 +89,10 @@ over from the left-hand-side vector.
...
@@ -88,6 +89,10 @@ over from the left-hand-side vector.
(label sets + values) of
`vector1`
and additionally all elements of
`vector2`
(label sets + values) of
`vector1`
and additionally all elements of
`vector2`
which do not have matching label sets in
`vector1`
.
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
## Vector matching
Operations between vectors attempt to find a matching element in the right-hand-side
Operations between vectors attempt to find a matching element in the right-hand-side
...
@@ -211,8 +216,8 @@ highest to lowest.
...
@@ -211,8 +216,8 @@ highest to lowest.
1.
`*`
,
`/`
,
`%`
1.
`*`
,
`/`
,
`%`
2.
`+`
,
`-`
2.
`+`
,
`-`
3.
`==`
,
`!=`
,
`<=`
,
`<`
,
`>=`
,
`>`
3.
`==`
,
`!=`
,
`<=`
,
`<`
,
`>=`
,
`>`
4.
`
AND
`
4.
`
and`
,
`unless
`
5.
`
OR
`
5.
`
or
`
Operators on the same precedence level are left-associative. For example,
Operators on the same precedence level are left-associative. For example,
`2 * 3 % 2`
is equivalent to
`(2 * 3) % 2`
.
`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