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
56120a71
Commit
56120a71
authored
Jul 15, 2016
by
Brian Brazil
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Explain how we handle strings.
Fixes #232
parent
98284d5d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
basics.md
content/docs/querying/basics.md
+12
-1
No files found.
content/docs/querying/basics.md
View file @
56120a71
...
@@ -35,11 +35,22 @@ vector is the only type that can be directly graphed.
...
@@ -35,11 +35,22 @@ vector is the only type that can be directly graphed.
### String literals
### String literals
Strings may be specified as literals in single or double quotes.
Strings may be specified as literals in single quotes, double quotes or
backticks.
PromQL follows the same
[
escaping rules as
Go](https://golang.org/ref/spec#String_literals). In single or double quotes a
backslash begins an escape sequence, which may be followed by
`a`
,
`b`
,
`f`
,
`n`
,
`r`
,
`t`
,
`v`
or
`\`. Specific characters can be provided using octal
(`
\n
nn
`) or hexadecimal (`
\x
nn
`, `
\u
nnnn
` and `
\U
nnnnnnnn
`).
No escaping is processed inside backticks. Unlike Go, Prometheus does not discard newlines inside backticks.
Example:
Example:
"this is a string"
"this is a string"
'these are unescaped: \n \\ \t'
`
these are not unescaped:
\n
' "
\t
`
### Float literals
### Float literals
...
...
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