Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/Constants.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
\define('_BETWEEN', 'BETWEEN');
\define('_notBETWEEN', 'NOT BETWEEN');

\define('_isNULL', 'IS NULL');
\define('_notNULL', 'IS NOT NULL');
\define('_isNULL', 'IS');
\define('_notNULL', 'IS NOT');
\define('_BOOLEAN_OPERATORS', [
'<', '>', '=', '!=', '>=', '<=', '<>',
'IN', 'LIKE', 'NOT LIKE', 'BETWEEN', 'NOT BETWEEN', 'IS', 'IS NOT'
Expand Down
4 changes: 2 additions & 2 deletions lib/ezFunctions.php
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ function gte($x, $y, $and = null, ...$args)
*
* @return array
*/
function isNull($x, $y = 'null', $and = null, ...$args)
function isNull($x, $y = 'NULL', $and = null, ...$args)
{
$expression = array();
\array_push($expression, $x, \_isNULL, $y, $and, ...$args);
Expand All @@ -370,7 +370,7 @@ function isNull($x, $y = 'null', $and = null, ...$args)
*
* @return array
*/
function isNotNull($x, $y = 'null', $and = null, ...$args)
function isNotNull($x, $y = 'NULL', $and = null, ...$args)
{
$expression = array();
\array_push($expression, $x, \_notNULL, $y, $and, ...$args);
Expand Down
4 changes: 2 additions & 2 deletions tests/ezFunctionsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,13 +174,13 @@ public function testGte()
public function testIsNull()
{
$this->assertIsArray(isNull('field'));
$this->assertArraySubset([2 => 'null'], isNull('field'));
$this->assertArraySubset([2 => 'NULL'], isNull('field'));
}

public function testIsNotNull()
{
$this->assertIsArray(isNotNull('field'));
$this->assertArraySubset([2 => 'null'], isNotNull('field'));
$this->assertArraySubset([2 => 'NULL'], isNotNull('field'));
}

public function testLike()
Expand Down