web-base/Core/Driver/SQL/Condition/CondNull.class.php

20 lines
403 B
PHP
Raw Permalink Normal View History

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
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; }
function getExpression(SQL $sql, array &$params): string {
return $sql->columnName($this->getColumn()) . " IS NULL";
}
2021-01-13 01:36:04 +01:00
}