You are here

public function Condition::isNotNull in Drupal 9

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Database/Query/Condition.php \Drupal\Core\Database\Query\Condition::isNotNull()

Sets a condition that the specified field be NOT NULL.

Parameters

string|\Drupal\Core\Database\Query\SelectInterface $field: The name of the field or a subquery to check.

Return value

$this The called object.

Overrides ConditionInterface::isNotNull

File

core/lib/Drupal/Core/Database/Query/Condition.php, line 154

Class

Condition
Generic class for a series of conditions in a query.

Namespace

Drupal\Core\Database\Query

Code

public function isNotNull($field) {
  return $this
    ->condition($field, NULL, 'IS NOT NULL');
}