
| Current Path : /var/www/html/ift/web/core/lib/Drupal/Core/Database/Query/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html/ift/web/core/lib/Drupal/Core/Database/Query/QueryConditionTrait.php |
<?php
namespace Drupal\Core\Database\Query;
use Drupal\Core\Database\Connection;
/**
* Provides an implementation of ConditionInterface.
*
* @see \Drupal\Core\Database\Query\ConditionInterface
*/
trait QueryConditionTrait {
/**
* The condition object for this query.
*
* Condition handling is handled via composition.
*
* @var \Drupal\Core\Database\Query\Condition
*/
protected $condition;
/**
* {@inheritdoc}
*/
public function condition($field, $value = NULL, $operator = '=') {
$this->condition->condition($field, $value, $operator);
return $this;
}
/**
* {@inheritdoc}
*/
public function isNull($field) {
$this->condition->isNull($field);
return $this;
}
/**
* {@inheritdoc}
*/
public function isNotNull($field) {
$this->condition->isNotNull($field);
return $this;
}
/**
* {@inheritdoc}
*/
public function exists(SelectInterface $select) {
$this->condition->exists($select);
return $this;
}
/**
* {@inheritdoc}
*/
public function notExists(SelectInterface $select) {
$this->condition->notExists($select);
return $this;
}
/**
* {@inheritdoc}
*/
public function alwaysFalse() {
$this->condition->alwaysFalse();
return $this;
}
/**
* {@inheritdoc}
*/
public function &conditions() {
return $this->condition->conditions();
}
/**
* {@inheritdoc}
*/
public function arguments() {
return $this->condition->arguments();
}
/**
* {@inheritdoc}
*/
public function where($snippet, $args = []) {
$this->condition->where($snippet, $args);
return $this;
}
/**
* {@inheritdoc}
*/
public function compile(Connection $connection, PlaceholderInterface $queryPlaceholder) {
$this->condition->compile($connection, $queryPlaceholder);
}
/**
* {@inheritdoc}
*/
public function compiled() {
return $this->condition->compiled();
}
/**
* {@inheritdoc}
*/
public function conditionGroupFactory($conjunction = 'AND') {
return $this->connection->condition($conjunction);
}
/**
* {@inheritdoc}
*/
public function andConditionGroup() {
return $this->conditionGroupFactory('AND');
}
/**
* {@inheritdoc}
*/
public function orConditionGroup() {
return $this->conditionGroupFactory('OR');
}
}