original_string: public function fetch($query, ...$data)
      {
          if ($data) {
              $query = $this->merge($query, $data);
          }
  
          try {
              $statement = $this->pdo->query($query);
  
              return new FetchedResult($statement->fetchAll(PDO::FETCH_ASSOC));
          } catch (PDOException $exception) {
              throw new QueryException($exception, $query);
          }
      }
code: public function fetch($query, ...$data)
      {
          if ($data) {
              $query = $this->merge($query, $data);
          }
  
          try {
              $statement = $this->pdo->query($query);
  
              return new FetchedResult($statement->fetchAll(PDO::FETCH_ASSOC));
          } catch (PDOException $exception) {
              throw new QueryException($exception, $query);
          }
      }
code_tokens: public function fetch ( $ query , ... $ data ) { if ( $ data ) { $ query = $ this -> merge ( $ query , $ data ) ; } try { $ statement = $ this -> pdo -> query ( $ query ) ; return new FetchedResult ( $ statement -> fetchAll ( PDO :: FETCH_ASSOC ) ) ; } catch ( PDOException $ exception ) { throw new QueryException ( $ exception , $ query ) ; } }
docstring: Run a query and eagerly fetch the result into memory
  
  Allows the result to be used more than once, for example when you
  want to count the result and then iterate over it. Normally the
  result would be entirely consumed after counting its rows.
  
  @param string $query
  @param mixed  ...$data
  @return FetchedResult
  @throws QueryException
docstring_tokens: Run a query and eagerly fetch the result into memory