Adds condition to select

@param array|null $condition
@return Select
329693
public function where(array $condition = null): Select
    {
        if (!\is_array($condition)) {
            throw new InvalidArgumentException('$condition has to be an array');
        }
        $this->where = (new Condition($this->namesClass->getAliases()))->parse($condition);

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

        return new self($condition);
    }
711921
public function select($select = null)
    {

        $this->string['select'] = $this->useBuilder('select')
            ->select($select, $this->cleanThis());

        return $this;
    }
615078
public function where($condition) {
        if (is_array($condition)) {
            $this->condition = new ArrayCondition($condition);
        } elseif ($condition instanceof ConditionInterface) {
            $this->condition = $condition;
        } else {
            throw new InvalidSQLConditionException('无效的SQL条件');
        }

        $this->condition->setStatementContext($this->statementContext);

        return $this;
    }
1201423
public function createCondition(array $condition): ConditionInterface
    {
        foreach ($this->conditionNameToConditionClassMap as $conditionName => $conditionClass) {
            if (isset($condition[$conditionName])) {
                return new $conditionClass($condition['command'], $condition[$conditionName]);
            }
        }

        throw new ConditionNotFoundException(sprintf('Condition could not be found, available conditions are: %s', implode(', ', $this->conditionNameToConditionClassMap)));
    }
993721
public static function basedOn($condition): self
    {
        $name = $condition instanceof Condition ? $condition->name() : $condition;

        return new self($name, '');
    }
1273952
public function addConditions( $conditions )
	{
		if( !is_array( $conditions ) )
			throw new InvalidArgumentException( 'An Array should be given.' );
		foreach( $conditions as $condition )
			$this->addCondition( $condition );
	}
1364581
public function Where($condition, $values) {
        $this->setWhere($condition);
        $this->addBindValues($values);
        return $this;
    }
384992
public function addCondition(ConditionAbstract $condition)
    {
        if ($condition instanceof MediaCondition) {
            $this->conditions[] = $condition;
        } else {
            throw new \InvalidArgumentException(
                "Invalid condition instance. Instance of 'MediaCondition' expected."
            );
        }

        return $this;
    }
8536
public function join($condition, string $expression = null): object
    {
        if (!is_array($condition)) {
            $condition = [$condition => $expression];
        }
        $this->container[$this->id]['s']['join'] = array_merge($this->container[$this->id]['s']['join'], $condition);
        return $this;
    }
806642
public function where($condition, $value = null, $append = false, $clause = "WHERE")
    {
        if (is_array($value)) {
            $condition = $this->formatWhereConditionWithMultipleTokens($condition, $value, $this->escapeValidator);
        } else {
            if ($value === null) {
                $condition = preg_replace("/=\s*\?/", "IS ?", $condition, 1);
                $value = 'NULL';
            } else if (is_bool($value)) {
                $value = $value ? 'TRUE' : 'FALSE';
            } else if (is_int($value) || is_float($value)) {
                // Preserve $value as is
            } else {
                $rid = $this->ridValidator->check($value, true);
                $value = $rid ? $rid : '"' . $this->escapeValidator->check($value, true) . '"';
            }

            $condition = str_replace("?", $value, $condition);
        }

        if (!$this->getTokenValue('Where')) {
            $clause = 'WHERE';
        }

        $this->setTokenValues('Where', array("{$clause} $condition"), $append, false, false);

        return $this;
    }
964583
public function appendIf($condition, string $append)
    {
        if ($this->resolveCondition($condition)) {
            return $this->append($append);
        }

        return $this;
    }
817553
public function orWhere(string ...$condition) : self
    {
        $this->whereConditions = $this->addConditionToClause(
            $this->whereConditions, 'OR', ...$condition);

        return $this;
    }
948511
public function addCondition(\TechPromux\DynamicQueryBundle\Entity\DataModelCondition $condition)
    {
        $this->conditions[] = $condition;

        return $this;
    }
1012471
public function fetch($condition = array())
    {
        $query = self::getInstance($this, $condition);

        return $this->getRepository()->fetch($query);
    }
483600
public function reject( $condition ) {
		return $this->filter( function ( $v, $k ) use ( $condition ) {
			return ! call_user_func( $condition, $v, $k );
		} );
	}
640733
public function addCondition(ICondition $condition)
    {
        if (!isset($this->conditions)) {
            $this->conditions = [];
        }

        $this->conditions[] = $condition;
    }