1
0
Fork 0

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

This commit is contained in:
Jan Steemann 2014-09-10 13:12:45 +02:00
commit 2255c9cf20
2 changed files with 10 additions and 4 deletions

View File

@ -86,10 +86,10 @@ Using a transformation:
```js
var query = Foxx.createQuery({
query: 'FOR u IN _users RETURN u',
query: 'FOR u IN _users SORT u.user ASC RETURN u',
transform: function (results) {
return results.length;
return results[0];
}
});
var numberOfUsers = query(); // a number >= 0
var user = query(); // first user by username
```

View File

@ -5147,6 +5147,7 @@ function CALCULATE_SHORTEST_PATHES_WITH_FLOYD_WARSHALL (graphData, options) {
graph.toVertices.forEach(function (a) {
graph.toVerticesIDs[a._id] = a;
});
graph.docStore = {};
var paths = {};
@ -5257,8 +5258,13 @@ function CALCULATE_SHORTEST_PATHES_WITH_FLOYD_WARSHALL (graphData, options) {
p.vertices.forEach(function (v) {
if (graph.fromVerticesIDs[v]) {
vTmp.push(graph.fromVerticesIDs[v]);
} else {
} else if (graph.toVerticesIDs[v]) {
vTmp.push(graph.toVerticesIDs[v]);
} else if (graph.docStore[v]) {
vTmp.push(graph.docStore[v]);
} else {
graph.docStore[v] = DOCUMENT_HANDLE(v);
vTmp.push(graph.docStore[v]);
}
});
p.vertices = vTmp;