Condition::$conditionOperatorMap
Same name in other branches
- 9 core/lib/Drupal/Core/Database/Query/Condition.php \Drupal\Core\Database\Query\Condition::conditionOperatorMap
- 10 core/lib/Drupal/Core/Database/Query/Condition.php \Drupal\Core\Database\Query\Condition::conditionOperatorMap
- 11.x core/lib/Drupal/Core/Database/Query/Condition.php \Drupal\Core\Database\Query\Condition::conditionOperatorMap
Provides a map of condition operators to condition operator options.
Type: conditionOperatorMap
File
-
core/
lib/ Drupal/ Core/ Database/ Query/ Condition.php, line 16
Class
- Condition
- Generic class for a series of conditions in a query.
Namespace
Drupal\Core\Database\QueryCode
protected static $conditionOperatorMap = [
'BETWEEN' => [
'delimiter' => ' AND ',
],
'NOT BETWEEN' => [
'delimiter' => ' AND ',
],
'IN' => [
'delimiter' => ', ',
'prefix' => '(',
'postfix' => ')',
],
'NOT IN' => [
'delimiter' => ', ',
'prefix' => '(',
'postfix' => ')',
],
'IS NULL' => [
'use_value' => FALSE,
],
'IS NOT NULL' => [
'use_value' => FALSE,
],
// Use backslash for escaping wildcard characters.
'LIKE' => [
'postfix' => " ESCAPE '\\\\'",
],
'NOT LIKE' => [
'postfix' => " ESCAPE '\\\\'",
],
// Exists expects an already bracketed subquery as right hand part. Do
// not define additional brackets.
'EXISTS' => [],
'NOT EXISTS' => [],
// These ones are here for performance reasons.
'=' => [],
'<' => [],
'>' => [],
'>=' => [],
'<=' => [],
];
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.