Gets the next row in the result set

@param object $result | A MySQLi link result object
@param bool $useExceptions | Override to throw an _Exception on error
@return array/bool | Returns the row as an associative array on success / FALSE on failure
489005
public static function _getRow($result = NULL, $useExceptions = _DbConfig::USE_EXCEPTIONS) {
        if (!self::_isConnected()) {
            self::_createConnection();
        }
        return self::$_db->getRow($result, $useExceptions);
    }
600278
protected function getResultTable($results)
    {
        $resultSet = 1;
        $resultTable     = \MUtil_Html::create()->array();
        foreach ($results as $result) {
            if (is_string($result)) {
                $this->addMessage($result);
            } else {
                $resultRow = $resultTable->echo($result, sprintf($this->_('Result set %s.'), $resultSet++));
                $resultRow->class = 'browser';
            }
        }
        return $resultTable;
    }
911620
boolean getMoreResults(int current) throws SQLException {
        checkClosed();

        if (resultIn == null || !resultIn.isData()) {
            return false;
        }

        if (resultSetCounter == 0) {
            resultSetCounter++;
            return true;
        }

        if (currentResultSet != null && current != KEEP_CURRENT_RESULT) {
            currentResultSet.close();
        }

        resultIn = null;

        return false;
    }
56176
protected function transformResult(array $result)
    {
        if ($this->columnTransformers->count()) {
            foreach ($result as $index => $row) {
                $result[$index] = $this->transformRow($row);
            }
        }
        
        return $result;
    }
521807
public function onResult(\pq\Result $result = null) {
		if ($result && $result->status != \pq\Result::TUPLES_OK) {
			return $result;
		}
		
		$rowset = $this->getRowsetPrototype();
		if (is_callable($rowset)) {
			return $rowset($result);
		} elseif ($rowset) {
			return new $rowset($this, $result);
		}
		
		return $result;
	}
1364771
protected function handleResult(array $result)
    {
        if ($this->onlyCount && isset($result[0]) && is_array($result[0])) {
            return (int)current($result[0]);
        }

        $entities = [];
        foreach ($result as $row) {
            $model = clone $this->getModel();
            $model->populate($row);
            $entities[] = $model;
        }
        return $entities;
    }
850306
protected function result($result)
    {
        $this->result =
            $result instanceof Result
                ? $result
                : new Result($result['healthy'], $result['exception_message']);

        return $this->result;
    }
1124139
@Override
  public boolean next() throws SFException
  {
    logger.debug("next called");

    List<Object> nextRowList;
    try
    {
      // call the fixed view next row method
      nextRowList = fixedView.getNextRow();
    }
    catch (Exception ex)
    {
      throw (SFException) IncidentUtil.generateIncidentV2WithException(
          session,
          new SFException(ErrorCode.INTERNAL_ERROR,
                          IncidentUtil.oneLiner("Error getting next row from " +
                                                "fixed view:", ex)),
          null,
          null);
    }

    row++;

    if (nextRowList == null)
    {
      logger.debug("end of result");
      return false;
    }

    if (nextRow == null)
    {
      nextRow = new Object[nextRowList.size()];
    }
    nextRow = nextRowList.toArray(nextRow);

    return true;
  }
1166672
public function loadResult()
    {
        // Get the first row from the result set as an array.
        $row = $this->fetchArray();

        if ($row) {
            $row = $row[0];
        }

        // Free up system resources and return.
        $this->freeResult();

        return $row;
    }
474175
public function fetch($result, $valuesKey = 'values')
    {
        if ('1.0' === $this->client->getApiVersion()) {
            return $this->fetchApi1($result, $valuesKey);
        }

        /** @var Request $request */
        $request = $this->client->getLastRequest();

        if (!array_key_exists('values', $result)) {
            throw new \RuntimeException(
                sprintf(
                    'No values-key "values" found in resource "%s", please report this bug to the Gush developers.',
                    $request->getResource()
                )
            );
        }

        $fullResult = $result['values'];

        // BitBucket please fix your API..
        // https://bitbucket.org/site/master/issue/9659/pagelen-sometimes-limited-to-100
        // Luckily we only need one extra request
        if (null !== $this->perPage && $this->perPage > 50 && isset($result['next']) && false !== strpos($request->getResource(), '/pullrequests')) {
            $response = $this->client->get($result['next']);
            $result = json_decode($response->getContent(), true);
            $fullResult = array_merge($fullResult, $result['values']);
        }

        // Adapter maximum is 100, which is also the maximum of BitBucket's API
        if (null === $this->perPage) {
            while (isset($result['next'])) {
                $response = $this->client->get($result['next']);
                $result = json_decode($response->getContent(), true);
                $fullResult = array_merge($fullResult, $result['values']);
            }
        }

        return $fullResult;
    }
688435
public function loadNextAssoc()
	{
		$this->connect();

		// Execute the query and get the result set cursor.
		if (!$this->executed)
		{
			if (!($this->execute()))
			{
				return $this->errorNum ? null : false;
			}
		}

		// Get the next row from the result set as an object of type $class.
		$row = $this->fetchAssoc();

		if ($row)
		{
			return $row;
		}

		// Free up system resources and return.
		$this->freeResult();

		return false;
	}
599984
protected static function parseSequence(&$data, &$result)
    {
        // Sequence
        $data = self::parseCommon($data, $sequenceData);
        $values = self::parseASN((string) $sequenceData);
        if (! is_array($values) || is_string($values[0])) {
            $values = [$values];
        }
        $result[] = [
            'sequence (' . self::$len . ')',
            $values, ];
    }
1211560
public static function executeSingleton0(string $query)
  {
    $result = self::query($query);
    $row    = $result->fetch_array(MYSQLI_NUM);
    $n      = $result->num_rows;
    $result->free();

    if (self::$mysqli->more_results()) self::$mysqli->next_result();

    if (!($n==0 || $n==1))
    {
      throw new ResultException('0 or 1', $n, $query);
    }

    return $row[0];
  }
187191
private function getRows($results) {
    $table = '<h3>Rows Of Data</h3>';

    if (count($results->getRows()) > 0) {
      $table .= '<table>';

      // Print headers.
      $table .= '<tr>';

      foreach ($results->getColumnHeaders() as $header) {
        $table .= '<th>' . $header->name . '</th>';
      }
      $table .= '</tr>';

      // Print table rows.
      foreach ($results->getRows() as $row) {
        $table .= '<tr>';
          foreach ($row as $cell) {
            $table .= '<td>'
                   . htmlspecialchars($cell, ENT_NOQUOTES)
                   . '</td>';
          }
        $table .= '</tr>';
      }
      $table .= '</table>';

    } else {
      $table .= '<p>No results found.</p>';
    }

    return $table;
  }
295430
public function fetchAssoc($result = null)
    {
        $result = $result ? $result : $this->getResult();

        $rows = [];

        if ($result->rowCount() > 0) {
            $results = $result->fetchAll(\PDO::FETCH_ASSOC);
            foreach ($results as $key => $value) {
                $rows[$key] = $value;
            }
        }

        return $rows;
    }
1066031
final public function getResult($result = '')
    {
        $result.= $this->generate();
        if ($this->successor !== null) {
            return $this->successor->getResult($result);
        }

        return $result;
    }
755016
protected function success($results = null)
    {
        $this->trigger('json-success', $this, $results);
        $this->trigger('response-success', $this, $results);

        $json = array('error' => false);

        if($results) {
            $json['results'] = $results;
        }

        $body = json_encode($json, JSON_PRETTY_PRINT);

        $this->response
            ->set('headers', 'Content-Type', 'text/json')
            ->set('body', $body);

        return $body;
    }