Final Class Yiisoft\Db\QueryBuilder\Condition\NotExists
| Inheritance | Yiisoft\Db\QueryBuilder\Condition\NotExists » Yiisoft\Db\QueryBuilder\Condition\AbstractExists |
|---|---|
| Implements | Yiisoft\Db\QueryBuilder\Condition\ConditionInterface |
Condition that represents NOT EXISTS operator that checks if a sub-query returns no rows.
Public Properties
| Property | Type | Description | Defined By |
|---|---|---|---|
| $query | Yiisoft\Db\Query\QueryInterface | Yiisoft\Db\QueryBuilder\Condition\AbstractExists |
Public Methods
| Method | Description | Defined By |
|---|---|---|
| __construct() | Yiisoft\Db\QueryBuilder\Condition\AbstractExists | |
| fromArrayDefinition() | Creates a condition based on the given operator and operands. | Yiisoft\Db\QueryBuilder\Condition\AbstractExists |
Method Details
| public mixed __construct ( Yiisoft\Db\Query\QueryInterface $query ) | ||
| $query | Yiisoft\Db\Query\QueryInterface |
The {@see \Yiisoft\Db\Query\QueryInterface} implementation representing the sub-query. |
final public function __construct(
public readonly QueryInterface $query,
) {}
Defined in: Yiisoft\Db\QueryBuilder\Condition\AbstractExists::fromArrayDefinition()
Creates a condition based on the given operator and operands.
| public static Yiisoft\Db\QueryBuilder\Condition\NotExists fromArrayDefinition ( string $operator, array $operands ) | ||
| $operator | string | |
| $operands | array | |
| throws | InvalidArgumentException |
If the number of operands isn't 1, and the first operand isn't a query object. |
|---|---|---|
final public static function fromArrayDefinition(string $operator, array $operands): static
{
if (isset($operands[0]) && $operands[0] instanceof QueryInterface) {
return new static($operands[0]);
}
throw new InvalidArgumentException(
sprintf(
'Sub-query for %s operator must be a Query object.',
$operator,
),
);
}
Signup or Login in order to comment.