1
0
Fork 0

Merge branch 'aql2' of https://github.com/triAGENS/ArangoDB into aql2

This commit is contained in:
Jan Steemann 2014-08-04 11:16:00 +02:00
commit 7dc549d058
2 changed files with 18 additions and 6 deletions

View File

@ -39,6 +39,16 @@ int ExecutionBlock::bind (std::map<std::string, struct TRI_json_s*>* params) {
return TRI_ERROR_NO_ERROR; return TRI_ERROR_NO_ERROR;
} }
bool ExecutionBlock::hasMore () {
// FIXME: do this correctly!
return ! _done;
}
bool ExecutionBlock::skip (size_t number) {
return true;
}
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
/// @brief functionality to walk an execution block recursively /// @brief functionality to walk an execution block recursively
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
@ -57,7 +67,7 @@ void ExecutionBlock::walk (WalkerWorker* worker) {
(*it)->walk(worker); (*it)->walk(worker);
} }
// Now handle a subquery: // Now handle a subquery:
if (_exePlan->getType() == ExecutionNode::SUBQUERY) { if (_exeNode->getType() == ExecutionNode::SUBQUERY) {
// auto p = static_cast<SubqueryBlock*>(this); // auto p = static_cast<SubqueryBlock*>(this);
if (worker->enterSubquery(this, nullptr)) { ; // p->_subquery if (worker->enterSubquery(this, nullptr)) { ; // p->_subquery
// p->_subquery->walk(worker); // p->_subquery->walk(worker);

View File

@ -51,7 +51,7 @@ namespace triagens {
class ExecutionBlock { class ExecutionBlock {
public: public:
ExecutionBlock (ExecutionNode const* ep) ExecutionBlock (ExecutionNode const* ep)
: _exePlan(ep), _done(false), _depth(0), _varOverview(nullptr) { : _exeNode(ep), _done(false), _depth(0), _varOverview(nullptr) {
} }
virtual ~ExecutionBlock (); virtual ~ExecutionBlock ();
@ -448,7 +448,9 @@ namespace triagens {
} }
} }
bool skip (int number); virtual bool hasMore ();
virtual bool skip (size_t number);
virtual int64_t count () { virtual int64_t count () {
return 0; return 0;
@ -459,7 +461,7 @@ namespace triagens {
} }
ExecutionNode const* getPlanNode () { ExecutionNode const* getPlanNode () {
return _exePlan; return _exeNode;
} }
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
@ -468,7 +470,7 @@ namespace triagens {
protected: protected:
ExecutionNode const* _exePlan; ExecutionNode const* _exeNode;
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
/// @brief our dependent nodes /// @brief our dependent nodes
@ -629,7 +631,7 @@ namespace triagens {
return res; return res;
} }
auto p = reinterpret_cast<EnumerateCollectionNode const*>(_exePlan); auto p = reinterpret_cast<EnumerateCollectionNode const*>(_exeNode);
V8ReadTransaction trx(p->_vocbase, p->_collname); V8ReadTransaction trx(p->_vocbase, p->_collname);