@param string   $sql
@param string[] ...$params

@return $this
343696
public function unionAllRaw(string $sql, string ...$params)
    {
        $instance = $this->selectQueryInstance();

        $instance->selectQuery()->unionAllRaw($sql, ...$params);

        return $instance;
    }
946470
public function orderByRaw(string $sql, string ...$params)
    {
        $this->addOrderBy($this->dialect()->quote($sql), null, $params);

        return $this;
    }
804912
public function groupBy(string $sql, array $params = []) : self
    {
        $this->qiterator = null;
        $this->group = [ $sql, $params ];
        return $this;
    }
805201
public function getPost($sql, $params)
    {
        $post = $this->findWhere("$sql", $params);
        return $post->setupPost($post);
    }
1287492
public function setSql($sql, array $params = [])
    {
        $this->sql = (string) $sql;

        $this->setSqlParameters($params);
    }
1171730
public function run($sql, array $params = array())
    {
        $sth = $this->pdo->prepare($sql);

        foreach ($params as $key => $value) {
            $key = is_numeric($key) ? $key + 1 : ":$key";
            $sth->bindValue($key, $value);
        }

        $sth->execute($params);
        $this->executed[] = $sql;
        return $sth;
    }
169969
public function whereExistsRaw(string $sql, string ...$params)
    {
        $this->wConditions = null;

        $this->exists = [
            'sql'    => $sql,
            'negate' => false,
            'params' => $params,
        ];

        return $this;
    }
476989
public function orWhere($sql=null, $params=array())
    {
        if(!isset($this->_where))
            $this->_where = new Criteria();

        $this->_where->or(new Criteria($sql, $params));

        return $this;
    }
245278
public function setRaw(string $sql, string ...$params)
    {
        $this->addSet($this->dialect()->quote($sql), $params);

        return $this;
    }
93452
public function sqlFetchAll(string $sql, array $params = []): array
    {
        return $this->prepare($sql, $params)->fetchAll(\PDO::FETCH_ASSOC);
    }
799335
public function selectRaw(string $sql, string ...$params)
    {
        $instance = $this->selectQueryInstance();

        $instance->selectQuery()->columnRaw($sql, ...$params);

        return $instance;
    }
744225
private function prepare($sql, array $params)
    {
        $statement = $this->connection->prepare($sql);
        foreach ($params as $key => $value) {
            $statement->bindValue($key, $value);
        }

        return $statement;
    }
1184261
public function havingRaw(string $sql, string ...$params)
    {
        $this->hConditions()->raw($sql, ...$params);

        return $this;
    }
686312
public function prepare(string $sql, array $params = []): Statement
    {
        if (!$stmt = $this->connection->prepare($sql)) {
            $error = [
                'error' => $this->connection->error,
                'errno' => $this->connection->errno,
                'sqlstate' => $this->connection->sqlstate
            ];

            throw new SqlException('Failed to prepare statement', [$error], $sql, $params);
        }

        if (!empty($params)) {
            if (!$stmt->bind_param(self::getMysqlParamTypes($params), ...$params)) {
                throw new SqlException('Failed to bind params', $stmt->error_list, $sql, $params);
            }
        }

        return new Statement($stmt, $this->usedPrepare, $sql, $params);
    }
217497
public function sqlExecute(string $sql, array $params = []): int
    {
        return $this->connection()->sqlExecute($sql, $params);
    }
167015
public function order(string $sql, array $params = []) : self
    {
        $this->qiterator = null;
        $name = null;
        if (!count($params)) {
            $name = preg_replace('(\s+(ASC|DESC)\s*$)i', '', $sql);
            try {
                $name = $this->getColumn(trim($name))['name'];
            } catch (\Exception $e) {
                $name = null;
            }
        }
        $this->order = [ $sql, $params, $name ];
        return $this;
    }
863127
public function groupBy($sql, $params=array())
    {
        $binder = new Binder();
        $this->_group = $binder->magicBind($sql, (array) $params);

        return $this;
    }