client/client.go
func (c *Client) pagedQuery(pageSize int, dataset, project, queryStr string, dataChan chan Data) ([][]interface{}, []string, error) {
	// connect to service
	service, err := c.connect()
	if err != nil {
		if dataChan != nil {
			dataChan <- Data{Err: err}
		}
		return nil, nil, err
	}

	if c.allowLargeResults && len(c.tempTableName) > 0 {
		return c.largeDataPagedQuery(service, pageSize, dataset, project, queryStr, dataChan)
	}

	return c.stdPagedQuery(service, pageSize, dataset, project, queryStr, dataChan)
}
func (c *Client) pagedQuery(pageSize int, dataset, project, queryStr string, dataChan chan Data) ([][]interface{}, []string, error) {
	// connect to service
	service, err := c.connect()
	if err != nil {
		if dataChan != nil {
			dataChan <- Data{Err: err}
		}
		return nil, nil, err
	}

	if c.allowLargeResults && len(c.tempTableName) > 0 {
		return c.largeDataPagedQuery(service, pageSize, dataset, project, queryStr, dataChan)
	}

	return c.stdPagedQuery(service, pageSize, dataset, project, queryStr, dataChan)
}
// pagedQuery executes the query using bq's paging mechanism to load all results and sends them back via dataChan if available, otherwise it returns the full result set, headers and error as return values