2020-04-02 00:02:51 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Driver\SQL\Condition;
|
|
|
|
|
|
|
|
class Compare extends Condition {
|
|
|
|
|
2020-04-03 17:39:58 +02:00
|
|
|
private string $operator;
|
|
|
|
private string $column;
|
|
|
|
private $value;
|
|
|
|
|
2021-04-02 21:58:06 +02:00
|
|
|
public function __construct(string $col, $val, string $operator = '=') {
|
2020-04-02 00:02:51 +02:00
|
|
|
$this->operator = $operator;
|
|
|
|
$this->column = $col;
|
|
|
|
$this->value = $val;
|
|
|
|
}
|
|
|
|
|
2021-04-02 21:58:06 +02:00
|
|
|
public function getColumn(): string { return $this->column; }
|
2020-04-02 00:02:51 +02:00
|
|
|
public function getValue() { return $this->value; }
|
2021-04-02 21:58:06 +02:00
|
|
|
public function getOperator(): string { return $this->operator; }
|
2020-04-02 00:02:51 +02:00
|
|
|
|
2020-04-03 17:39:58 +02:00
|
|
|
}
|