framework/db/QueryBuilder.php
public function buildCondition($condition, &$params)
    {
        if (is_array($condition)) {
            if (empty($condition)) {
                return '';
            }

            $condition = $this->createConditionFromArray($condition);
        }

        if ($condition instanceof ExpressionInterface) {
            return $this->buildExpression($condition, $params);
        }

        return (string) $condition;
    }
public function buildCondition($condition, &$params)
    {
        if (is_array($condition)) {
            if (empty($condition)) {
                return '';
            }

            $condition = $this->createConditionFromArray($condition);
        }

        if ($condition instanceof ExpressionInterface) {
            return $this->buildExpression($condition, $params);
        }

        return (string) $condition;
    }
Parses the condition specification and generates the corresponding SQL expression.
@param string|array|ExpressionInterface $condition the condition specification. Please refer to [[Query::where()]]
on how to specify a condition.
@param array $params the binding parameters to be populated
@return string the generated SQL expression