Improve validation
Signed-off-by: David Arendsen <darendsen@gamepoint.com>
This commit is contained in:
parent
3cff68870f
commit
602228a5e8
6 changed files with 53 additions and 44 deletions
|
|
@ -9,6 +9,11 @@ class Limit extends Base
|
|||
*/
|
||||
private $limit;
|
||||
|
||||
/**
|
||||
* @var int $offset
|
||||
*/
|
||||
private $offset;
|
||||
|
||||
public function __construct(int $limit, int $offset = 0)
|
||||
{
|
||||
$this->limit = $limit;
|
||||
|
|
|
|||
21
src/Functions/Measurement.php
Normal file
21
src/Functions/Measurement.php
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
|
||||
namespace Arendsen\FluxQueryBuilder\Functions;
|
||||
|
||||
class Measurement extends Base
|
||||
{
|
||||
/**
|
||||
* @var string $measurement
|
||||
*/
|
||||
private $measurement;
|
||||
|
||||
public function __construct(string $measurement)
|
||||
{
|
||||
$this->measurement = $measurement;
|
||||
}
|
||||
|
||||
public function __toString()
|
||||
{
|
||||
return '|> filter(fn: (r) => r._measurement == "' . (string)$this->measurement . '") ';
|
||||
}
|
||||
}
|
||||
Loading…
Add table
editor.link_modal.header
Reference in a new issue