Add addLast() function

This commit is contained in:
David Arendsen 2023-02-10 11:40:35 +01:00
commit 3d32bdb45d
6 changed files with 100 additions and 0 deletions

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

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