Add sum() Flux function + docs

Signed-off-by: davidarendsen <davidarendsen@hey.com>
This commit is contained in:
davidarendsen 2023-01-17 16:25:24 +00:00
commit 2257e4f9cd
6 changed files with 108 additions and 0 deletions

View file

@ -16,6 +16,7 @@ or [fromBucket()](functions/fromBucket.md)
* [addRangeStart()](functions/addRangeStart.md)
or [addRangeInBetween()](functions/addRangeInBetween.md)
* [addReduce()](functions/addReduce.md)
* [addSum()](functions/addSum.md)
Anything missing here? You can use this method to add anything to the query:
* [addRawFunction()](functions/addRawFunction.md)

39
docs/functions/addSum.md Normal file
View file

@ -0,0 +1,39 @@
# Flux Query Builder Docs
## Functions &raquo; addSum()
### Parameters:
<table>
<tbody>
<tr>
<th>Name</th>
<th>Required</th>
<th>Data type</th>
<th>Description</th>
</tr>
<tr>
<td>column</td>
<td>Yes</td>
<td>string</td>
<td>Column to operate on. Default is "_value".</td>
</tr>
</tbody>
</table>
### Example
```php
->addSum('_value')
```
This will result in the following Flux function part:
```
|> sum(column: "_value")
```
### Extra resources
* [Flux documentation](https://docs.influxdata.com/flux/v0.x/stdlib/universe/sum/)