diff --git a/arangod/Aql/Executor.cpp b/arangod/Aql/Executor.cpp index 7a562fe5f2..3c3f28d701 100644 --- a/arangod/Aql/Executor.cpp +++ b/arangod/Aql/Executor.cpp @@ -177,7 +177,7 @@ std::unordered_map const Executor::FunctionNames{ // document functions { "HAS", Function("HAS", "AQL_HAS", "az,s", true, false, true, &Functions::Has) }, - { "ATTRIBUTES", Function("ATTRIBUTES", "AQL_ATTRIBUTES", "a|b,b", true, false, true) }, + { "ATTRIBUTES", Function("ATTRIBUTES", "AQL_ATTRIBUTES", "a|b,b", true, false, true, &Functions::Attributes) }, { "VALUES", Function("VALUES", "AQL_VALUES", "a|b", true, false, true) }, { "MERGE", Function("MERGE", "AQL_MERGE", "a,a|+", true, false, true, &Functions::Merge) }, { "MERGE_RECURSIVE", Function("MERGE_RECURSIVE", "AQL_MERGE_RECURSIVE", "a,a|+", true, false, true) }, diff --git a/arangod/Aql/Functions.h b/arangod/Aql/Functions.h index a0cf5a7e86..92feff964d 100644 --- a/arangod/Aql/Functions.h +++ b/arangod/Aql/Functions.h @@ -66,6 +66,7 @@ namespace triagens { static AqlValue Keep (triagens::aql::Query*, triagens::arango::AqlTransaction*, TRI_document_collection_t const*, AqlValue const); static AqlValue Merge (triagens::aql::Query*, triagens::arango::AqlTransaction*, TRI_document_collection_t const*, AqlValue const); static AqlValue Has (triagens::aql::Query*, triagens::arango::AqlTransaction*, TRI_document_collection_t const*, AqlValue const); + static AqlValue Attributes (triagens::aql::Query*, triagens::arango::AqlTransaction*, TRI_document_collection_t const*, AqlValue const); static AqlValue Min (triagens::aql::Query*, triagens::arango::AqlTransaction*, TRI_document_collection_t const*, AqlValue const); static AqlValue Max (triagens::aql::Query*, triagens::arango::AqlTransaction*, TRI_document_collection_t const*, AqlValue const); static AqlValue Sum (triagens::aql::Query*, triagens::arango::AqlTransaction*, TRI_document_collection_t const*, AqlValue const); diff --git a/js/apps/system/_admin/aardvark/APP/frontend/js/modules/org/arangodb/aql/explainer.js b/js/apps/system/_admin/aardvark/APP/frontend/js/modules/org/arangodb/aql/explainer.js index 256c67267e..c67d9b16c8 100644 --- a/js/apps/system/_admin/aardvark/APP/frontend/js/modules/org/arangodb/aql/explainer.js +++ b/js/apps/system/_admin/aardvark/APP/frontend/js/modules/org/arangodb/aql/explainer.js @@ -327,6 +327,8 @@ function processQuery (query, explain) { return "{ }"; case "object element": return value(JSON.stringify(node.name)) + " : " + buildExpression(node.subNodes[0]); + case "calculated object element": + return "[ " + buildExpression(node.subNodes[0]) + " ] : " + buildExpression(node.subNodes[1]); case "array": if (node.hasOwnProperty("subNodes")) { return "[ " + node.subNodes.map(buildExpression).join(", ") + " ]"; diff --git a/js/common/modules/org/arangodb/aql/explainer.js b/js/common/modules/org/arangodb/aql/explainer.js index 7c0a025784..f84013a8a9 100644 --- a/js/common/modules/org/arangodb/aql/explainer.js +++ b/js/common/modules/org/arangodb/aql/explainer.js @@ -326,6 +326,8 @@ function processQuery (query, explain) { return "{ }"; case "object element": return value(JSON.stringify(node.name)) + " : " + buildExpression(node.subNodes[0]); + case "calculated object element": + return "[ " + buildExpression(node.subNodes[0]) + " ] : " + buildExpression(node.subNodes[1]); case "array": if (node.hasOwnProperty("subNodes")) { return "[ " + node.subNodes.map(buildExpression).join(", ") + " ]";