mirror of https://gitee.com/bigwinds/arangodb
fixed display of Traversals in AQL explain
This commit is contained in:
parent
3e044748bf
commit
45d9745756
|
@ -111,6 +111,7 @@ TraversalNode::TraversalNode(ExecutionPlan* plan, size_t id,
|
|||
_vertexOutVariable(nullptr),
|
||||
_edgeOutVariable(nullptr),
|
||||
_pathOutVariable(nullptr),
|
||||
_inVariable(nullptr),
|
||||
_graphObj(nullptr),
|
||||
_condition(nullptr) {
|
||||
TRI_ASSERT(_vocbase != nullptr);
|
||||
|
@ -244,9 +245,14 @@ TraversalNode::TraversalNode(ExecutionPlan* plan, size_t id,
|
|||
_minDepth(minDepth),
|
||||
_maxDepth(maxDepth),
|
||||
_directions(directions),
|
||||
_graphObj(nullptr),
|
||||
_condition(nullptr) {
|
||||
|
||||
_graphJson = arangodb::basics::Json(arangodb::basics::Json::Array, edgeColls.size());
|
||||
|
||||
for (auto& it : edgeColls) {
|
||||
_edgeColls.push_back(it);
|
||||
_graphJson.add(arangodb::basics::Json(it));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -258,6 +264,7 @@ TraversalNode::TraversalNode(ExecutionPlan* plan,
|
|||
_edgeOutVariable(nullptr),
|
||||
_pathOutVariable(nullptr),
|
||||
_inVariable(nullptr),
|
||||
_graphObj(nullptr),
|
||||
_condition(nullptr) {
|
||||
_minDepth =
|
||||
arangodb::basics::JsonHelper::stringUInt64(base.json(), "minDepth");
|
||||
|
|
|
@ -788,7 +788,7 @@ function processQuery (query, explain) {
|
|||
node.edgeCollectionNameStrLen = node.graphDefinition.edgeCollectionNames.join(", ").length;
|
||||
}
|
||||
else {
|
||||
var edgeCols = node.graph;
|
||||
var edgeCols = node.graph || [ ];
|
||||
edgeCols.forEach(function(ecn) {
|
||||
e.push(collection(ecn));
|
||||
});
|
||||
|
@ -809,7 +809,7 @@ function processQuery (query, explain) {
|
|||
(node.count ? " " + keyword("WITH COUNT") : "") +
|
||||
(node.outVariable ? " " + keyword("INTO") + " " + variableName(node.outVariable) : "") +
|
||||
(node.keepVariables ? " " + keyword("KEEP") + " " + node.keepVariables.map(function(variable) { return variableName(variable); }).join(", ") : "") +
|
||||
" " + annotation("/* " + node.aggregationOptions.method + "*/");
|
||||
" " + annotation("/* " + node.aggregationOptions.method + " */");
|
||||
case "CollectNode":
|
||||
var collect = keyword("COLLECT") + " " +
|
||||
node.groups.map(function(node) {
|
||||
|
|
|
@ -787,7 +787,7 @@ function processQuery (query, explain) {
|
|||
node.edgeCollectionNameStrLen = node.graphDefinition.edgeCollectionNames.join(", ").length;
|
||||
}
|
||||
else {
|
||||
var edgeCols = node.graph;
|
||||
var edgeCols = node.graph || [ ];
|
||||
edgeCols.forEach(function(ecn) {
|
||||
e.push(collection(ecn));
|
||||
});
|
||||
|
@ -808,7 +808,7 @@ function processQuery (query, explain) {
|
|||
(node.count ? " " + keyword("WITH COUNT") : "") +
|
||||
(node.outVariable ? " " + keyword("INTO") + " " + variableName(node.outVariable) : "") +
|
||||
(node.keepVariables ? " " + keyword("KEEP") + " " + node.keepVariables.map(function(variable) { return variableName(variable); }).join(", ") : "") +
|
||||
" " + annotation("/* " + node.aggregationOptions.method + "*/");
|
||||
" " + annotation("/* " + node.aggregationOptions.method + " */");
|
||||
case "CollectNode":
|
||||
var collect = keyword("COLLECT") + " " +
|
||||
node.groups.map(function(node) {
|
||||
|
|
Loading…
Reference in New Issue