Start documentation

Signed-off-by: davidarendsen <davidarendsen@hey.com>
This commit is contained in:
davidarendsen 2022-12-23 13:57:25 +00:00
commit 5d8f079ead
4 changed files with 43 additions and 1 deletions

View file

@ -1,7 +1,8 @@
# InfluxDB 2.x Flux Query Builder
With this query builder you can build queries for Flux.
See https://docs.influxdata.com/influxdb/v2.4/query-data/flux/
[Check our documentation](docs/00-index.md)
## Installation

9
docs/00-index.md Normal file
View file

@ -0,0 +1,9 @@
# Flux Query Builder Docs
Welcome to the documentation of the PHP Flux Query Builder.
* [InfluxDB concepts](01-what-is-influxdb.md)
* [What is Flux?](02-what-is-flux.md)
* [Official InfluxDB documentation](https://docs.influxdata.com/influxdb/v2.6/query-data/flux/)

View file

@ -0,0 +1,16 @@
# Flux Query Builder Docs
## What is InfluxDB?
If you're used to working with SQL databases you may need to understand a few concepts. This page will explain some InfluxDB concepts.
InfluxDB is a time-series database. This means the index is a time. This time can be accurate until nanoseconds. This makes it perfect for logging purposes.
### Buckets
Buckets could be seen as databases. They can be configured with a retention time. This can be set from a few minutes until eternity.
### Measurements
Each bucket can contain multiple measurements. This can be seen as a database table. They hold the actual inserted data.
However the main difference is that they don't have a pre-determined structure. Which means each data insertion can have a different data structure.

16
docs/02-what-is-flux.md Normal file
View file

@ -0,0 +1,16 @@
# Flux Query Builder Docs
## What is Flux?
Since InfluxDB2 they introduced this new Flux query language. Coming from a SQL database background this is a totally new concept and language to learn.
### Example Flux query:
```js
from(bucket: "example-bucket")
|> range(start: -1h)
|> filter(fn: (r) =>
r._measurement == "example-measurement"
and r.tag == "example-tag"
)
|> filter(fn: (r) => r._field == "example-field")
```