Add sum() Flux function + docs
Signed-off-by: davidarendsen <davidarendsen@hey.com>
This commit is contained in:
parent
ee0ae4ca20
commit
2257e4f9cd
6 changed files with 108 additions and 0 deletions
21
src/Functions/Sum.php
Normal file
21
src/Functions/Sum.php
Normal 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 . '") ';
|
||||
}
|
||||
}
|
||||
Loading…
Add table
editor.link_modal.header
Reference in a new issue