Set where condition

@param $condition
@return $this
484391
public function where($condition)
    {
        $this->where = ! $this->where ? $condition : $this->where . ' AND ' . $condition;

        return $this;
    }
1180641
public function where(\Parable\ORM\Query\ConditionSet $set)
    {
        $this->where[] = $set;
        return $this;
    }
485200
public function where($where = null, $value = null)
        {
            if (Arrays::is($this->where)) {
                $this->whereKey = count($this->where) + 1;
            }

            $this->where[$this->whereKey]['attr'] = $where;
            $this->where[$this->whereKey]['value'] = $value;

            return $this;
        }
9029
public function setWhere(array $where)
    {
        // When the statement is empty set the
        // where property to null to prevent
        // empty statement errors.
        if (empty($where)) {
            // delete the current where statement
            $this->where = null;

            // Skip further execution
            return $this;
        }

        // Ensure the base $or clause
        if (! isset($where['$or'])) {
            // wrap the statement in an $or clause
            $where = ['$or' => [$where]];
        }

        // Fetch the last clause in the $or array
        // to allow further chaining it's required
        // to be wrapped in an @and statement.
        $lastClause = array_pop($where['$or']);

        if (! isset($lastClause['$and'])) {
            // Wrap in an @and statement
            $lastClause = ['$and' => [$lastClause]];
        }

        // Re-append the $and clause
        $where['$or'][] = $lastClause;

        // Replace the base where statement
        $this->where = $where;

        return $this;
    }
586913
public function orHavingRaw(string $condition): self
    {
        $this->condition->orHaving([new RawExp($condition)]);

        return $this;
    }
502827
public function setConditions($conditions)
    {
        $this->conditions = [];
        if (!is_array($conditions)) {
            $conditions = [$conditions];
        }
        foreach ($conditions as $condition) {
            $this->addCondition($condition);
        }

        return $this;
    }
489004
public function addCondition(\Sulu\Bundle\ResourceBundle\Entity\Condition $conditions)
    {
        $this->conditions[] = $conditions;

        return $this;
    }
1263033
public function filterOne(array $condition)
	{
		foreach ($condition as $column => $value) {
			$expr = Criteria::expr()->eq($column, $value);
			$this->criteria->andWhere($expr);
		}

		return $this;
	}
72641
protected function setWhere()
    {
        $foreign = $this->getForeignKey();

        $parentKey = $this->parentMap->getKeyName();

        $this->query->where($foreign, '=', $this->parent->getEntityAttribute($parentKey));

        return $this;
    }
293805
public function where($conditions)
    {
        if ($conditions = is_array($conditions) && func_num_args() === 1 ? $conditions : func_get_args()) {
            $this->_parts['where'][] = $conditions;
        }
        return $this;
    }
612789
public function addCondition(Condition $condition): Condition
    {
        $query = $this->connection->createQueryBuilder()
            ->insert('ngbm_rule_condition')
            ->values(
                [
                    'id' => ':id',
                    'status' => ':status',
                    'rule_id' => ':rule_id',
                    'type' => ':type',
                    'value' => ':value',
                ]
            )
            ->setValue(
                'id',
                $condition->id !== null ?
                    (int) $condition->id :
                    $this->connectionHelper->getAutoIncrementValue('ngbm_rule_condition')
            )
            ->setParameter('status', $condition->status, Type::INTEGER)
            ->setParameter('rule_id', $condition->ruleId, Type::INTEGER)
            ->setParameter('type', $condition->type, Type::STRING)
            ->setParameter('value', json_encode($condition->value), Type::STRING);

        $query->execute();

        $condition->id = $condition->id ?? (int) $this->connectionHelper->lastInsertId('ngbm_rule_condition');

        return $condition;
    }
1197340
public function setCondition($condition)
    {
        if ((!$condition instanceof PaletteConditionInterface)
            && (!$condition instanceof PropertyConditionInterface)
        ) {
            throw new DcGeneralInvalidArgumentException(
                'The condition is invalid. ' .
                ' Only use PaletteConditionInterface or PropertyConditionInterface.'
            );
        }

        $this->condition = $condition;

        return $this;
    }
1073272
protected function setWhere()
    {
        $foreign = $this->getForeignKey();

        $this->query->where($foreign, '=', $this->parent->getKey());

        return $this;
    }
763147
public static function create($condition): self
    {
        $condition = $condition instanceof Condition ? $condition : Condition::fromValue($condition);

        return new self($condition);
    }
310247
public function where($key, $condition = null, $value = null)
    {
        if (!is_null($condition) && is_null($value)) {
            $value = $condition;
            $condition = '=';
        }

        if (count($this->_conditions) < 1) {
            array_push($this->_conditions, []);
        }
        return $this->makeWhere($key, $condition, $value);
    }
426547
public function andWithString(string $condition, ...$values): self
    {
        $this->parts[] = [
            'type' => 'AND',
            'condition' => $condition,
            'values' => $values,
        ];

        return $this;
    }
274005
public function orWhere(...$conditions) : self
    {
        $this->conditionalQueryBuilder->orWhere(
            ...$this->createConditionExpressions($conditions)
        );

        return $this;
    }