Paradox/toolbox/Query.php
public function getAll($query, array $parameters = array(), $includeCount = false)
    {
        if ($this->_toolbox->getTransactionManager()->hasTransaction()) {
            $statement = array('query' => $query, 'bindVars' => $parameters);

            if ($includeCount) {
                $statement['count'] = true;
                $statement = json_encode($statement, JSON_FORCE_OBJECT);
                $this->_toolbox->getTransactionManager()->addCommand("function () {var cursor = db._createStatement($statement).execute(); return {count: cursor.count(), results: cursor.elements()};}();" , "Query:getAll");
            } else {
                $statement = json_encode($statement, JSON_FORCE_OBJECT);
                $this->_toolbox->getTransactionManager()->addCommand("db._createStatement($statement).execute().elements();" , "Query:getAll");
            }

        } else {
            $data = array(
                    'query' => $query,
                    'bindVars' => $parameters,
                    Cursor::ENTRY_FLAT => true
            );

            $statement = new Statement($this->_toolbox->getConnection(), $data);

            if ($includeCount) {
                $statement->setCount(true);
            }

            try {
                $cursor = $statement->execute();
            } catch (\Exception $e) {
                $normalised = $this->_toolbox->normaliseDriverExceptions($e);
                throw new QueryException($normalised['message'], $normalised['code']);
            }

            $results = $cursor->getAll();

            if ($includeCount) {
                return array('results' => $results, 'count' => $cursor->getCount());
            } else {
                return $results;
            }
        }
    }
public function getAll($query, array $parameters = array(), $includeCount = false)
    {
        if ($this->_toolbox->getTransactionManager()->hasTransaction()) {
            $statement = array('query' => $query, 'bindVars' => $parameters);

            if ($includeCount) {
                $statement['count'] = true;
                $statement = json_encode($statement, JSON_FORCE_OBJECT);
                $this->_toolbox->getTransactionManager()->addCommand("function () {var cursor = db._createStatement($statement).execute(); return {count: cursor.count(), results: cursor.elements()};}();" , "Query:getAll");
            } else {
                $statement = json_encode($statement, JSON_FORCE_OBJECT);
                $this->_toolbox->getTransactionManager()->addCommand("db._createStatement($statement).execute().elements();" , "Query:getAll");
            }

        } else {
            $data = array(
                    'query' => $query,
                    'bindVars' => $parameters,
                    Cursor::ENTRY_FLAT => true
            );

            $statement = new Statement($this->_toolbox->getConnection(), $data);

            if ($includeCount) {
                $statement->setCount(true);
            }

            try {
                $cursor = $statement->execute();
            } catch (\Exception $e) {
                $normalised = $this->_toolbox->normaliseDriverExceptions($e);
                throw new QueryException($normalised['message'], $normalised['code']);
            }

            $results = $cursor->getAll();

            if ($includeCount) {
                return array('results' => $results, 'count' => $cursor->getCount());
            } else {
                return $results;
            }
        }
    }
Executes an AQL query and return all results. If nothing is found, an empty array is returned.
@param  string         $query      The AQL query to run.
@param  array          $parameters An optional associative array containing parameters to bind to the query.
@throws QueryException
@return array