Add Group, Limit, Map, Sort functions

Signed-off-by: davidarendsen <davidarendsen@hey.com>
This commit is contained in:
davidarendsen 2022-08-10 16:09:29 +00:00
commit 147b2d9017
11 changed files with 252 additions and 2 deletions

22
src/Function/Map.php Normal file
View file

@ -0,0 +1,22 @@
<?php
namespace Arendsen\FluxQueryBuilder\Function;
class Map extends Base {
/**
* @var array $query
*/
private $query;
public function __construct(string $query)
{
$this->query = $query;
}
public function __toString()
{
return '|> map(fn: (r) => ({ ' . $this->query . ' })) ';
}
}