24 lines
443 B
PHP
24 lines
443 B
PHP
<?php
|
|
|
|
namespace Toalett\Redis\Timeseries\Model;
|
|
|
|
final class Filter
|
|
{
|
|
private string $filter;
|
|
|
|
public function __construct(string $label, string $comparison, ?string $value = '')
|
|
{
|
|
$this->filter = "{$label}{$comparison}{$value}";
|
|
}
|
|
|
|
public static function where(string $label): Where
|
|
{
|
|
return new Where($label);
|
|
}
|
|
|
|
public function toString(): string
|
|
{
|
|
return $this->filter;
|
|
}
|
|
}
|