mirror of https://gitee.com/bigwinds/arangodb
renaming
This commit is contained in:
parent
2881409527
commit
0ec4e7f73e
|
@ -29,6 +29,7 @@
|
||||||
|
|
||||||
#include "Aql/Query.h"
|
#include "Aql/Query.h"
|
||||||
#include "Aql/ExecutionBlock.h"
|
#include "Aql/ExecutionBlock.h"
|
||||||
|
#include "Aql/ExecutionEngine.h"
|
||||||
#include "Aql/ExecutionPlan.h"
|
#include "Aql/ExecutionPlan.h"
|
||||||
#include "Aql/Parser.h"
|
#include "Aql/Parser.h"
|
||||||
#include "Aql/V8Executor.h"
|
#include "Aql/V8Executor.h"
|
||||||
|
@ -175,25 +176,22 @@ QueryResult Query::execute () {
|
||||||
auto plan = ExecutionPlan::instanciateFromAst(parser.ast());
|
auto plan = ExecutionPlan::instanciateFromAst(parser.ast());
|
||||||
|
|
||||||
try {
|
try {
|
||||||
auto exec = ExecutionBlock::instanciatePlan(plan);
|
auto engine = ExecutionEngine::instanciateFromPlan(plan->root());
|
||||||
|
|
||||||
try {
|
try {
|
||||||
exec->staticAnalysis();
|
auto root = engine->root();
|
||||||
|
root->execute();
|
||||||
exec->initialize();
|
|
||||||
exec->execute();
|
|
||||||
|
|
||||||
AqlItemBlock* value;
|
AqlItemBlock* value;
|
||||||
while (nullptr != (value = exec->getOne())) {
|
while (nullptr != (value = root->getOne())) {
|
||||||
std::cout << value->getValue(0, 0)->toString() << std::endl;
|
std::cout << value->getValue(0, 0)->toString() << std::endl;
|
||||||
delete value;
|
delete value;
|
||||||
}
|
}
|
||||||
|
|
||||||
exec->shutdown();
|
delete engine;
|
||||||
delete exec;
|
|
||||||
}
|
}
|
||||||
catch (...) {
|
catch (...) {
|
||||||
delete exec;
|
delete engine;
|
||||||
delete plan;
|
delete plan;
|
||||||
// TODO: convert exception code
|
// TODO: convert exception code
|
||||||
return QueryResult(TRI_ERROR_INTERNAL);
|
return QueryResult(TRI_ERROR_INTERNAL);
|
||||||
|
|
Loading…
Reference in New Issue