Final Class Yiisoft\Db\QueryBuilder\Condition\NotIn
| Inheritance | Yiisoft\Db\QueryBuilder\Condition\NotIn » Yiisoft\Db\QueryBuilder\Condition\AbstractIn |
|---|---|
| Implements | Yiisoft\Db\QueryBuilder\Condition\ConditionInterface |
Condition that represents NOT IN operator.
Public Properties
Public Methods
| Method | Description | Defined By |
|---|---|---|
| __construct() | Yiisoft\Db\QueryBuilder\Condition\AbstractIn | |
| fromArrayDefinition() | Creates a condition based on the given operator and operands. | Yiisoft\Db\QueryBuilder\Condition\AbstractIn |
Method Details
| public mixed __construct ( Yiisoft\Db\Expression\ExpressionInterface|iterable|string $column, iterable|Yiisoft\Db\Query\QueryInterface $values ) | ||
| $column | Yiisoft\Db\Expression\ExpressionInterface|iterable|string |
The column name. If it's an array, a composite condition will be generated. |
| $values | iterable|Yiisoft\Db\Query\QueryInterface |
An array of values that {@see $columns} value should be among.
If it's an empty array, the generated expression will be a |
final public function __construct(
public readonly iterable|string|ExpressionInterface $column,
public readonly iterable|QueryInterface $values,
) {}
Defined in: Yiisoft\Db\QueryBuilder\Condition\AbstractIn::fromArrayDefinition()
Creates a condition based on the given operator and operands.
| public static Yiisoft\Db\QueryBuilder\Condition\NotIn fromArrayDefinition ( string $operator, array $operands ) | ||
| $operator | string | |
| $operands | array | |
| throws | InvalidArgumentException |
If the number of operands isn't 2. |
|---|---|---|
final public static function fromArrayDefinition(string $operator, array $operands): static
{
if (!isset($operands[0], $operands[1])) {
throw new InvalidArgumentException("Operator '$operator' requires two operands.");
}
return new static(
self::validateColumn($operator, $operands[0]),
self::validateValues($operator, $operands[1]),
);
}
Signup or Login in order to comment.