2021-01-13 01:36:04 +01:00
|
|
|
<?php
|
|
|
|
|
2022-11-18 18:06:46 +01:00
|
|
|
namespace Core\Driver\SQL\Condition;
|
2021-01-13 01:36:04 +01:00
|
|
|
|
2023-01-05 22:47:17 +01:00
|
|
|
use Core\Driver\SQL\SQL;
|
|
|
|
|
2021-01-13 01:36:04 +01:00
|
|
|
class CondNull extends Condition {
|
|
|
|
|
|
|
|
private string $column;
|
|
|
|
|
|
|
|
public function __construct(string $col) {
|
|
|
|
$this->column = $col;
|
|
|
|
}
|
|
|
|
|
2021-04-02 21:58:06 +02:00
|
|
|
public function getColumn(): string { return $this->column; }
|
2023-01-05 22:47:17 +01:00
|
|
|
|
|
|
|
function getExpression(SQL $sql, array &$params): string {
|
|
|
|
return $sql->columnName($this->getColumn()) . " IS NULL";
|
|
|
|
}
|
2021-01-13 01:36:04 +01:00
|
|
|
}
|