BigQuery/src/Job.php
public function queryResults(array $options = [])
    {
        $timeoutMs = $this->pluck('initialTimeoutMs', $options, false) ?: 0;
        $queryResultsOptions = $options;
        $options['timeoutMs'] = $timeoutMs;

        return new QueryResults(
            $this->connection,
            $this->identity['jobId'],
            $this->identity['projectId'],
            $this->connection->getQueryResults($options + $this->identity),
            $this->mapper,
            $this,
            $queryResultsOptions
        );
    }
public function queryResults(array $options = [])
    {
        $timeoutMs = $this->pluck('initialTimeoutMs', $options, false) ?: 0;
        $queryResultsOptions = $options;
        $options['timeoutMs'] = $timeoutMs;

        return new QueryResults(
            $this->connection,
            $this->identity['jobId'],
            $this->identity['projectId'],
            $this->connection->getQueryResults($options + $this->identity),
            $this->mapper,
            $this,
            $queryResultsOptions
        );
    }
public function queryResults ( array $ options = [ ] ) { $ timeoutMs = $ this -> pluck ( 'initialTimeoutMs' , $ options , false ) ? : 0 ; $ queryResultsOptions = $ options ; $ options [ 'timeoutMs' ] = $ timeoutMs ; return new QueryResults ( $ this -> connection , $ this -> identity [ 'jobId' ] , $ this -> identity [ 'projectId' ] , $ this -> connection -> getQueryResults ( $ options + $ this -> identity ) , $ this -> mapper , $ this , $ queryResultsOptions ) ; }
Retrieves the results of a query job.

Please note this method will trigger an initial network request, but
further polling may be necessary in order to access the full query
results. Polling for completion can be initiated by iterating on the
returned
{@see Google\Cloud\BigQuery\QueryResults}, or by calling either
{@see Google\Cloud\BigQuery\QueryResults::rows()} or
{@see Google\Cloud\BigQuery\QueryResults::waitUntilComplete()}.

Example:
```
$queryResults = $job->queryResults();
```

@see https://cloud.google.com/bigquery/docs/reference/v2/jobs/getQueryResults
Jobs getQueryResults API documentation.

@param array $options [optional] {
Configuration options.

@type int $maxResults Maximum number of results to read per page.
@type int $startIndex Zero-based index of the starting row.
@type int $initialTimeoutMs How long, in milliseconds, to wait for
query results to become available before timing out.
**Defaults to** `0` milliseconds (0 seconds). Please note
that this option is used only for the initial call to get query
results. To control the timeout for any subsequent calls while
polling for query results to complete, please see the
`$timeoutMs` option.
@type int $timeoutMs How long, in milliseconds, each API call will
wait for query results to become available before timing out.
Depending on whether the $maxRetries has been exceeded,
the results will be polled again after the timeout has been
reached. **Defaults to** `10000` milliseconds (10 seconds).
Please note that this option is used when iterating on the
returned class, and will not apply immediately upon calling of
this method.
@type int $maxRetries The number of times to poll the Job status,
until the job is complete. By default, will poll indefinitely.
Please note that this option is used when iterating on the
returned class, and will not block immediately upon calling of
this method.
}
@return QueryResults
Retrieves the results of a query job .