Add documentation about addMap, addSort, addUnwindow, and addWindow

Signed-off-by: David Arendsen <darendsen@gamepoint.com>
This commit is contained in:
David Arendsen 2023-02-11 17:33:35 +01:00
commit b7e0b21c8f
9 changed files with 179 additions and 27 deletions

View file

@ -1,22 +0,0 @@
<?php
namespace Arendsen\FluxQueryBuilder\Builder;
class FluxPart
{
public const FROM = 'from';
public const MEASUREMENT = 'measurement';
public const RANGE = 'range';
public const FILTERS = 'filters';
public const REDUCE = 'reduce';
public const MAP = 'map';
public const SORT = 'sort';
public const GROUP = 'group';
public const LIMIT = 'limit';
public const WINDOW = 'window';
public const MEAN = 'mean';
public const DUPLICATE = 'duplicate';
public const UNWINDOW = 'unwindow';
public const AGGREGATEWINDOW = 'aggregateWindow';
public const RAWFUNCTION = 'raw';
}

View file

@ -25,7 +25,7 @@ trait Universe
return $this;
}
public function addSort(array $columns, $desc): QueryBuilderInterface
public function addSort(array $columns = ['_value'], bool $desc = false): QueryBuilderInterface
{
$this->addToQuery(
new Sort($columns, $desc)