#510 improve nrql helper docstrings
This commit is contained in:
parent
10b2a17718
commit
d45e1dff0f
1 changed files with 31 additions and 5 deletions
|
|
@ -1021,27 +1021,53 @@
|
||||||
;; nrql-specific helpers:
|
;; nrql-specific helpers:
|
||||||
|
|
||||||
(defn facet
|
(defn facet
|
||||||
"(facet [:metric.name :alias])"
|
"Accepts any number of column names, or column/alias
|
||||||
|
pairs, or SQL expressions (optionally aliased):
|
||||||
|
|
||||||
|
(facet :id [:foo :bar] [[:max :quux]])
|
||||||
|
|
||||||
|
Produces: FACET id, foo AS bar, MAX(quux)"
|
||||||
[& args]
|
[& args]
|
||||||
(generic :facet args))
|
(generic :facet args))
|
||||||
|
|
||||||
(defn since
|
(defn since
|
||||||
"(since 2 :days :ago)"
|
"Accepts a time interval such as:
|
||||||
|
|
||||||
|
(since 2 :days :ago)
|
||||||
|
|
||||||
|
Produces: SINCE 2 DAYS AGO"
|
||||||
[& args]
|
[& args]
|
||||||
(generic :since args))
|
(generic :since args))
|
||||||
|
|
||||||
(defn until
|
(defn until
|
||||||
"(until 1 :month :ago)"
|
"Accepts a time interval such as:
|
||||||
|
|
||||||
|
(until 1 :month :ago)
|
||||||
|
|
||||||
|
Produces: UNTIL 1 MONTH AGO"
|
||||||
[& args]
|
[& args]
|
||||||
(generic :until args))
|
(generic :until args))
|
||||||
|
|
||||||
(defn compare-with
|
(defn compare-with
|
||||||
"(compare-with 1 :week :ago)"
|
"Accepts a time interval such as:
|
||||||
|
|
||||||
|
(compare-with 1 :week :ago)
|
||||||
|
|
||||||
|
Produces: COMPARE WITH 1 WEEK AGO"
|
||||||
[& args]
|
[& args]
|
||||||
(generic :compare-with args))
|
(generic :compare-with args))
|
||||||
|
|
||||||
(defn timeseries
|
(defn timeseries
|
||||||
"(timeseries 1 :week :ago)"
|
"Accepts a time interval such as:
|
||||||
|
|
||||||
|
(timeseries 1 :day)
|
||||||
|
|
||||||
|
or:
|
||||||
|
|
||||||
|
(timeseries :auto)
|
||||||
|
|
||||||
|
Produces: TIMESERIES 1 DAY
|
||||||
|
Or: TIMESERIES AUTO"
|
||||||
[& args]
|
[& args]
|
||||||
(generic :timeseries args))
|
(generic :timeseries args))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue