mirror of https://gitee.com/bigwinds/arangodb
First attempt for multi collection graphs. Not yet functional.
This commit is contained in:
parent
e8cdc5190f
commit
21cf784cbc
|
@ -87,8 +87,11 @@ void ClusterTraverser::EdgeGetter::operator() (std::string const& startVertex,
|
||||||
std::vector<std::string>& result,
|
std::vector<std::string>& result,
|
||||||
size_t*& last,
|
size_t*& last,
|
||||||
size_t& eColIdx,
|
size_t& eColIdx,
|
||||||
bool&) {
|
bool& unused) {
|
||||||
TRI_ASSERT(eColIdx < _traverser->_edgeCols.size());
|
if (eColIdx >= _traverser->_edgeCols.size()) {
|
||||||
|
// Nothing to do, caller has set a defined state already.
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (last == nullptr) {
|
if (last == nullptr) {
|
||||||
TRI_ASSERT(_traverser->_iteratorCache.size() == result.size());
|
TRI_ASSERT(_traverser->_iteratorCache.size() == result.size());
|
||||||
// We have to request the next level
|
// We have to request the next level
|
||||||
|
@ -110,9 +113,10 @@ void ClusterTraverser::EdgeGetter::operator() (std::string const& startVertex,
|
||||||
triagens::basics::Json edgesJson = resultEdges.get("edges");
|
triagens::basics::Json edgesJson = resultEdges.get("edges");
|
||||||
size_t count = edgesJson.size();
|
size_t count = edgesJson.size();
|
||||||
if (count == 0) {
|
if (count == 0) {
|
||||||
// TODO Multiple edge collections
|
|
||||||
_traverser->_iteratorCache.pop();
|
_traverser->_iteratorCache.pop();
|
||||||
last = nullptr;
|
last = nullptr;
|
||||||
|
eColIdx++;
|
||||||
|
operator()(startVertex, result, last, eColIdx, unused);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
std::stack<std::string> stack;
|
std::stack<std::string> stack;
|
||||||
|
@ -166,6 +170,9 @@ void ClusterTraverser::EdgeGetter::operator() (std::string const& startVertex,
|
||||||
if (tmp.empty()) {
|
if (tmp.empty()) {
|
||||||
_traverser->_iteratorCache.pop();
|
_traverser->_iteratorCache.pop();
|
||||||
last = nullptr;
|
last = nullptr;
|
||||||
|
eColIdx++;
|
||||||
|
operator()(startVertex, result, last, eColIdx, unused);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
std::string next = tmp.top();
|
std::string next = tmp.top();
|
||||||
|
|
Loading…
Reference in New Issue