Skip to content

Commit

Permalink
Revert "Introduce class ipl\sql\Filter\IsNull"
Browse files Browse the repository at this point in the history
This reverts commit 0a68c04.
  • Loading branch information
nilmerg committed Mar 12, 2021
1 parent 81568ea commit e8cffd1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 17 deletions.
5 changes: 1 addition & 4 deletions src/Compat/FilterProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

use InvalidArgumentException;
use ipl\Sql\Filter\Exists;
use ipl\Sql\Filter\IsNull;
use ipl\Sql\Filter\NotExists;
use ipl\Sql\Sql;
use ipl\Stdlib\Filter;
Expand Down Expand Up @@ -101,13 +100,11 @@ public static function assemblePredicate(Filter\Condition $filter)
$operator = 'EXISTS';
} elseif ($filter instanceof NotExists) {
$operator = 'NOT EXISTS';
} elseif ($filter instanceof IsNull) {
$operator = 'IS NULL';
} else {
throw new InvalidArgumentException(sprintf('Cannot render filter: %s', get_class($filter)));
}

return $expression !== null ? ["$column $operator ?" => $expression] : ["$column $operator"];
return ["$column $operator ?" => $expression];
}
}
}
13 changes: 0 additions & 13 deletions src/Filter/IsNull.php

This file was deleted.

0 comments on commit e8cffd1

Please sign in to comment.