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

21
src/Functions/Sum.php Normal file
View file

@ -0,0 +1,21 @@
<?php
namespace Arendsen\FluxQueryBuilder\Functions;
class Sum extends Base
{
/**
* @var string $column
*/
private $column;
public function __construct(string $column)
{
$this->column = $column;
}
public function __toString()
{
return '|> sum(column: "' . (string)$this->column . '") ';
}
}