added v1.databases function, resolves #859

pull/860/head
Scott Anderson 2020-03-24 11:39:24 -06:00
parent a1cc4021fe
commit c326b97eb6
6 changed files with 36 additions and 0 deletions

View File

@ -0,0 +1,26 @@
---
title: v1.databases() function
description: The `v1.databases()` function returns a list of databases in an InfluxDB 1.7+ instance.
menu:
v2_0_ref:
name: v1.databases
parent: InfluxDB v1
weight: 301
related:
- https://docs.influxdata.com/influxdb/latest/query_language/schema_exploration#show-databases, SHOW DATABASES in InfluxQL
---
The `v1.databases()` function returns a list of databases in an **InfluxDB 1.7+ instance**.
```js
import "influxdata/influxdb/v1"
v1.databases()
```
Output includes the following columns:
- **databaseName:** Database name _(string)_
- **retentionPolicy:** Retention policy name _(string)_
- **retentionPeriod:** Retention period in nanoseconds _(integer)_
- **default:** Default retention policy for database _(boolean)_

View File

@ -9,6 +9,8 @@ menu:
parent: InfluxDB v1
weight: 301
v2.0/tags: [measurements]
related:
- https://docs.influxdata.com/influxdb/latest/query_language/schema_exploration#show-measurements, SHOW MEASUREMENTS in InfluxQL
---
The `v1.measurements()` function returns a list of measurements in a specific bucket.

View File

@ -9,6 +9,8 @@ menu:
parent: InfluxDB v1
weight: 301
v2.0/tags: [tags]
related:
- https://docs.influxdata.com/influxdb/latest/query_language/schema_exploration#show-tag-keys, SHOW TAG KEYS in InfluxQL
---
The `v1.measurementTagKeys()` function returns a list of tag keys for a specific measurement.

View File

@ -9,6 +9,8 @@ menu:
parent: InfluxDB v1
weight: 301
v2.0/tags: [tags]
related:
- https://docs.influxdata.com/influxdb/latest/query_language/schema_exploration#show-tag-values, SHOW TAG VALUES in InfluxQL
---
The `v1.measurementTagValues()` function returns a list of tag values for a specific measurement.

View File

@ -9,6 +9,8 @@ menu:
parent: InfluxDB v1
weight: 301
v2.0/tags: [tags]
related:
- https://docs.influxdata.com/influxdb/latest/query_language/schema_exploration#show-tag-keys, SHOW TAG KEYS in InfluxQL
---
The `v1.tagKeys()` function returns a list of tag keys for all series that match the [`predicate`](#predicate).

View File

@ -9,6 +9,8 @@ menu:
parent: InfluxDB v1
weight: 301
v2.0/tags: [tags]
related:
- https://docs.influxdata.com/influxdb/latest/query_language/schema_exploration#show-tag-values, SHOW TAG VALUES in InfluxQL
---
The `v1.tagValues()` function returns a list unique values for a given tag.