Construct a new result-set.

@param resource $result
@param boolean $buffered

@return SQLResultSet
@see SQL::Query()
339795
abstract function __construct($result, $buffered = true);

	/**
	 * Unserialize the SQLResultSet.
	 *
	 * @param string $data
	 *
	 * @return void
	 */

	public function unserialize($data){

		$this->_fetched = unserialize($data);
	}
371786
@Override
	public ResultSet resultSet() {
		try {
			return agent().query(context());
		} catch (SQLException e) {
			throw new UroborosqlSQLException(e);
		}
	}
70833
private function postExecute($result): ExecutionResult
    {
        if ($result instanceof Promise) {
            $result = $this->promiseAdapter->wait($result);
        }

        $this->checkExecutionResult($result);

        return $this->dispatcher->dispatch(Events::POST_EXECUTOR, new ExecutorResultEvent($result))->getResult();
    }
122357
protected function processDetails(Buffer &$buffer, Result &$result)
    {

        // We go until we hit an empty key
        while ($buffer->getLength()) {
            $key = $buffer->readString();
            if (strlen($key) == 0) {
                break;
            }
            $result->add($key, utf8_encode($buffer->readString()));
        }
    }
484002
public function hydrateResult($result, $soapFunction)
    {
        $result = $this->hydrator->hydrateResult($result, $soapFunction);
        if (is_array($result)) {
            $hydrated = array();
            foreach ($result as $key => $value) {
                $hydrated[$key] = $this->hydrateResult($value, $soapFunction);
            }

            return $hydrated;
        }

        if ($result instanceof \stdClass) {
            return $this->stcClassToArray->toArray($result);
        }

        return $result;
    }
786059
public function buildResult($result)
    {
        $updates = [];

        foreach ($result as $updateData) {
            $update = new Update($updateData);
            $updates[] = $update;
            $this->lastUpdateId = max($this->lastUpdateId, $update->updateId);
        }

        return $updates;
    }
850306
protected function result($result)
    {
        $this->result =
            $result instanceof Result
                ? $result
                : new Result($result['healthy'], $result['exception_message']);

        return $this->result;
    }
932120
public function findByResult(Result $result)
    {
        $dql = '
            SELECT
                u.id,
                CONCAT(u.firstName, \' \', u.lastName) AS name,
                m.value AS mark,
                m.id AS markId
            FROM Claroline\ResultBundle\Entity\Mark m
            JOIN m.user u
            WHERE m.result = :result
            ORDER BY u.lastName ASC
        ';

        $query = $this->_em->createQuery($dql);
        $query->setParameter('result', $result);

        return $query->getArrayResult();
    }
192868
protected function createResult (PDOStatement $result, $entity = null)
		{
			if ($result->columnCount()) {
				return new DatabaseResult($result, $this->transformEntity($entity));
			} else {
				return true;
			}
		}
747051
private function transformResult($result)
    {
        if ($this->actualDriver() === self::DRIVER_PREDIS && $result instanceof Status) {
            $result = $result->getPayload() === 'OK';
        }
        return $result;
    }
413081
public function formatQueryResult(QueryResultInterface $result, OutputInterface $output, $elapsed)
    {
        $table = new Table($output);
        $table->setHeaders(array_merge([
            'Path',
        ], $result->getColumnNames()));

        foreach ($result->getRows() as $row) {
            $values = array_merge([
                $row->getPath(),
            ], $row->getValues());

            foreach ($values as &$value) {
                if ($value instanceof \DateTime) {
                    $value = $value->format('c');
                    continue;
                }

                $value = $this->textHelper->truncate($value, 255);
            }

            $table->addRow($values);
        }

        $table->render($output);

        if (true === $this->config['show_execution_time_query']) {
            $output->writeln(sprintf(
                '%s rows in set (%s sec)',
                count($result->getRows()),
                number_format($elapsed, $this->config['execution_time_expansion']))
            );
        }
    }
601501
public function addResult(Result $result): self
    {
        $handler = $result->getHandlerName();
        $this->results[$handler][] = $result;

        return $this;
    }
1245563
public static <R> MethodResult<R> success(R result) {
        return new MethodResult<>(result, null, false);
    }
1130460
public function setResult($name = null, $result = null)
    {
        if (null === $result) {
            $result = $name;
            array_push($this->results, $result);

            return $this;
        }

        $this->results[(string) $name] = $result;

        return $this;
    }
401391
public function processResult(array $result) {
        list($result, $isRaw) = array_values($result);

        if(!$isRaw && is_string($result)) {
            return $this->createClone($result);
        }

        return $result;
    }
399934
function query($sql, $resultmode = null)
    {
        $result = $this->tryReconnect(array($this->mysqli, 'query'), array($sql, $resultmode));
        if (!$result)
        {
            trigger_error(__CLASS__ . " SQL Error:" . $this->errorMessage($sql), E_USER_WARNING);

            return false;
        }
        if (is_bool($result))
        {
            return $result;
        }
        return new MySQLiRecord($result);
    }
717414
private function processResults($results)
    {
        $entries = $this->connection->getEntries($results);

        $objects = [];

        if (array_key_exists('count', $entries)) {
            for ($i = 0; $i < $entries['count']; $i++) {
                $entry = $this->newLdapEntry($entries[$i], $this->connection);

                $objects[] = $entry->getAttributes();
            }

            if (!empty($this->sortByField)) {
                return $this->processSortBy($objects);
            }
        }

        return $objects;
    }