mirror of https://gitee.com/bigwinds/arangodb
adjusted after API changes
This commit is contained in:
parent
1175e9e61c
commit
e777cb71b1
|
@ -117,7 +117,7 @@ ExecutionPlan* PlanGenerator::fromNodeFor (Query* query,
|
||||||
|
|
||||||
if (expression->type == NODE_TYPE_COLLECTION) {
|
if (expression->type == NODE_TYPE_COLLECTION) {
|
||||||
char const* collectionName = expression->getStringValue();
|
char const* collectionName = expression->getStringValue();
|
||||||
plan = new EnumerateCollectionPlan(query->vocbase(), std::string(collectionName), 0);
|
plan = new EnumerateCollectionPlan(query->vocbase(), std::string(collectionName));
|
||||||
}
|
}
|
||||||
else if (expression->type == NODE_TYPE_REFERENCE) {
|
else if (expression->type == NODE_TYPE_REFERENCE) {
|
||||||
auto v = static_cast<Variable*>(variable->getData());
|
auto v = static_cast<Variable*>(variable->getData());
|
||||||
|
@ -183,9 +183,13 @@ ExecutionPlan* PlanGenerator::fromNodeReturn (Query* query,
|
||||||
ExecutionPlan* previous,
|
ExecutionPlan* previous,
|
||||||
AstNode const* node) {
|
AstNode const* node) {
|
||||||
TRI_ASSERT(node != nullptr && node->type == NODE_TYPE_RETURN);
|
TRI_ASSERT(node != nullptr && node->type == NODE_TYPE_RETURN);
|
||||||
|
TRI_ASSERT(node->numMembers() == 1);
|
||||||
|
|
||||||
|
auto variable = node->getMember(0);
|
||||||
|
// TODO: the operand type of return is not necessarily a variable...
|
||||||
|
auto v = static_cast<Variable*>(variable->getData());
|
||||||
|
|
||||||
// TODO: use "node", otherwise we don't know what to return...
|
auto plan = new RootPlan(v->id, v->name);
|
||||||
auto plan = new RootPlan();
|
|
||||||
|
|
||||||
return addDependency(previous, plan);
|
return addDependency(previous, plan);
|
||||||
}
|
}
|
||||||
|
@ -198,7 +202,7 @@ ExecutionPlan* PlanGenerator::fromNode (Query* query,
|
||||||
AstNode const* node) {
|
AstNode const* node) {
|
||||||
TRI_ASSERT(node != nullptr);
|
TRI_ASSERT(node != nullptr);
|
||||||
|
|
||||||
ExecutionPlan* plan = new SingletonPlan(0);
|
ExecutionPlan* plan = new SingletonPlan();
|
||||||
|
|
||||||
size_t const n = node->numMembers();
|
size_t const n = node->numMembers();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue