BigQuery/src/QueryResults.php
public function waitUntilComplete(array $options = [])
    {
        $options += $this->queryResultsOptions;
        $maxRetries = $this->pluck('maxRetries', $options, false);
        $this->wait(
            function () {
                return $this->isComplete();
            },
            function () use ($options) {
                return $this->reload($options);
            },
            $this->job,
            $maxRetries
        );
    }
public function waitUntilComplete(array $options = [])
    {
        $options += $this->queryResultsOptions;
        $maxRetries = $this->pluck('maxRetries', $options, false);
        $this->wait(
            function () {
                return $this->isComplete();
            },
            function () use ($options) {
                return $this->reload($options);
            },
            $this->job,
            $maxRetries
        );
    }
public function waitUntilComplete ( array $ options = [ ] ) { $ options += $ this -> queryResultsOptions ; $ maxRetries = $ this -> pluck ( 'maxRetries' , $ options , false ) ; $ this -> wait ( function ( ) { return $ this -> isComplete ( ) ; } , function ( ) use ( $ options ) { return $ this -> reload ( $ options ) ; } , $ this -> job , $ maxRetries ) ; }
Blocks until the query is complete.

Example:
```
$queryResults->waitUntilComplete();
```

@param array $options [optional] {
Configuration options. Please note, these options will inherit the
values set by either
{@see Google\Cloud\BigQuery\BigQueryClient::runQuery()} or
{@see Google\Cloud\BigQuery\Job::queryResults()}.

@type int $maxResults Maximum number of results to read per page.
@type int $startIndex Zero-based index of the starting row.
@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).
@type int $maxRetries The number of times to poll the Job status,
until the job is complete. By default, will poll indefinitely.
}
@throws JobException If the maximum number of retries while waiting for
query completion has been exceeded.
Blocks until the query is complete .