fix: adjust examples to do what the headers suggest
parent
8948cd5486
commit
9549bacbb8
|
@ -139,9 +139,10 @@ Default is `(r) => true`.
|
||||||
```js
|
```js
|
||||||
import "influxdata/influxdb"
|
import "influxdata/influxdb"
|
||||||
|
|
||||||
influxdb.cardinality(bucket: "example-bucket", start: -1y)
|
influxdb.cardinality(bucket: "example-bucket", start: 1)
|
||||||
|
|
||||||
```
|
```
|
||||||
|
Note: if points have been written into the future, you will need to add an appropriate `stop` date
|
||||||
|
|
||||||
|
|
||||||
### Query series cardinality in a measurement//
|
### Query series cardinality in a measurement//
|
||||||
|
@ -151,7 +152,7 @@ import "influxdata/influxdb"
|
||||||
|
|
||||||
influxdb.cardinality(
|
influxdb.cardinality(
|
||||||
bucket: "example-bucket",
|
bucket: "example-bucket",
|
||||||
start: -1y,
|
start: 1,
|
||||||
predicate: (r) => r._measurement == "example-measurement",
|
predicate: (r) => r._measurement == "example-measurement",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -163,7 +164,7 @@ influxdb.cardinality(
|
||||||
```js
|
```js
|
||||||
import "influxdata/influxdb"
|
import "influxdata/influxdb"
|
||||||
|
|
||||||
influxdb.cardinality(bucket: "example-bucket", start: -1y, predicate: (r) => r.exampleTag == "foo")
|
influxdb.cardinality(bucket: "example-bucket", start: 1, predicate: (r) => r.exampleTag == "foo")
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue