mirror of https://gitee.com/bigwinds/arangodb
Merge branch 'devel' of https://github.com/triAGENS/ArangoDB into devel
This commit is contained in:
commit
2255c9cf20
|
@ -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
|
||||
```
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue