Add addBottom function

Signed-off-by: David Arendsen <darendsen@gamepoint.com>
This commit is contained in:
David Arendsen 2023-03-08 19:20:26 +01:00
commit 9e2bde4217
5 changed files with 91 additions and 0 deletions

View file

@ -8,6 +8,7 @@ On this page you will find the methods you can use in the query builder.
or [fromBucket()](functions/fromBucket.md)
* [fromMeasurement()](functions/fromMeasurement.md)
* [addAggregateWindow()](functions/addAggregateWindow.md)
* [addBottom()](functions/addBottom.md)
* [addCount()](functions/addCount.md)
* [addDuplicate()](functions/addDuplicate.md)
* [addFieldFilter()](functions/addFieldFilter.md)

View file

@ -0,0 +1,45 @@
# Flux Query Builder Docs
## Functions &raquo; addBottom()
### Parameters:
<table>
<tbody>
<tr>
<th>Name</th>
<th>Required</th>
<th>Data type</th>
<th>Description</th>
</tr>
<tr>
<td>n</td>
<td>Yes</td>
<td>string</td>
<td>Number of rows to return from each input table.</td>
</tr>
<tr>
<td>columns</td>
<td>No</td>
<td>array</td>
<td>List of columns to sort by. Default is ["_value"].</td>
</tr>
</tbody>
</table>
### Example
```php
->addBottom(2, ['_value'])
```
This will result in the following Flux function part:
```
|> bottom(n: 2, columns: ["_value"])
```
### Extra resources
* [Flux documentation](https://docs.influxdata.com/flux/v0.x/stdlib/universe/bottom/)