function StubConnection::mapConditionOperator

Same name and namespace in other branches
  1. 11.x core/tests/Drupal/Tests/Core/Database/Stub/StubConnection.php \Drupal\Tests\Core\Database\Stub\StubConnection::mapConditionOperator()
  2. 10 core/tests/Drupal/Tests/Core/Database/Stub/StubConnection.php \Drupal\Tests\Core\Database\Stub\StubConnection::mapConditionOperator()
  3. 9 core/tests/Drupal/Tests/Core/Database/Stub/StubConnection.php \Drupal\Tests\Core\Database\Stub\StubConnection::mapConditionOperator()
  4. 8.9.x core/tests/Drupal/Tests/Core/Database/Stub/StubConnection.php \Drupal\Tests\Core\Database\Stub\StubConnection::mapConditionOperator()

Gets any special processing requirements for the condition operator.

Some condition types require special processing, such as IN, because the value data they pass in is not a simple value. This is a simple overridable lookup function. Database connections should define only those operators they wish to be handled differently than the default.

Parameters

string $operator: The condition operator, such as "IN", "BETWEEN", etc. Case-sensitive.

Return value

array|null The extra handling directives for the specified operator, or NULL. The directives are an array with any of the following keys:

  • operator: The replacement operator.
  • field_suffix: SQL to append to the field, such as a type cast.
  • prefix: SQL to add before the value.
  • postfix: SQL to add after the value.
  • delimiter: The delimiter to implode multiple values with.
  • use_value: Whether to compile the value part. Defaults to TRUE.

Overrides Connection::mapConditionOperator

File

core/tests/Drupal/Tests/Core/Database/Stub/StubConnection.php, line 86

Class

StubConnection
A stub of the abstract Connection class for testing purposes.

Namespace

Drupal\Tests\Core\Database\Stub

Code

public function mapConditionOperator($operator) : null {
  return NULL;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.