You are here

protected static property Condition::$conditionOperatorMap 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::conditionOperatorMap

Provides a map of condition operators to condition operator options.

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\Query

Code

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.
  '=' => [],
  '<' => [],
  '>' => [],
  '>=' => [],
  '<=' => [],
];