diff --git a/arangod/Aql/PlanGenerator.cpp b/arangod/Aql/PlanGenerator.cpp new file mode 100644 index 0000000000..6203c06d18 --- /dev/null +++ b/arangod/Aql/PlanGenerator.cpp @@ -0,0 +1,64 @@ +//////////////////////////////////////////////////////////////////////////////// +/// @brief Aql, query plan generator +/// +/// @file +/// +/// DISCLAIMER +/// +/// Copyright 2014 ArangoDB GmbH, Cologne, Germany +/// Copyright 2004-2014 triAGENS GmbH, Cologne, Germany +/// +/// Licensed under the Apache License, Version 2.0 (the "License"); +/// you may not use this file except in compliance with the License. +/// You may obtain a copy of the License at +/// +/// http://www.apache.org/licenses/LICENSE-2.0 +/// +/// Unless required by applicable law or agreed to in writing, software +/// distributed under the License is distributed on an "AS IS" BASIS, +/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +/// See the License for the specific language governing permissions and +/// limitations under the License. +/// +/// Copyright holder is ArangoDB GmbH, Cologne, Germany +/// +/// @author Jan Steemann +/// @author Copyright 2014, ArangoDB GmbH, Cologne, Germany +/// @author Copyright 2012-2013, triAGENS GmbH, Cologne, Germany +//////////////////////////////////////////////////////////////////////////////// + +#include "Aql/PlanGenerator.h" + +using namespace triagens::aql; + +// ----------------------------------------------------------------------------- +// --SECTION-- constructors / destructors +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @brief create the generator +//////////////////////////////////////////////////////////////////////////////// + +PlanGenerator::PlanGenerator () { +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief destroy the generator +//////////////////////////////////////////////////////////////////////////////// + +PlanGenerator::~PlanGenerator () { +} + +// ----------------------------------------------------------------------------- +// --SECTION-- public functions +// ----------------------------------------------------------------------------- + + +// ----------------------------------------------------------------------------- +// --SECTION-- END-OF-FILE +// ----------------------------------------------------------------------------- + +// Local Variables: +// mode: outline-minor +// outline-regexp: "/// @brief\\|/// {@inheritDoc}\\|/// @page\\|// --SECTION--\\|/// @\\}" +// End: diff --git a/arangod/Aql/PlanGenerator.h b/arangod/Aql/PlanGenerator.h new file mode 100644 index 0000000000..1aad64b4d9 --- /dev/null +++ b/arangod/Aql/PlanGenerator.h @@ -0,0 +1,100 @@ +//////////////////////////////////////////////////////////////////////////////// +/// @brief Aql, query plan generator +/// +/// @file +/// +/// DISCLAIMER +/// +/// Copyright 2014 ArangoDB GmbH, Cologne, Germany +/// Copyright 2004-2014 triAGENS GmbH, Cologne, Germany +/// +/// Licensed under the Apache License, Version 2.0 (the "License"); +/// you may not use this file except in compliance with the License. +/// You may obtain a copy of the License at +/// +/// http://www.apache.org/licenses/LICENSE-2.0 +/// +/// Unless required by applicable law or agreed to in writing, software +/// distributed under the License is distributed on an "AS IS" BASIS, +/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +/// See the License for the specific language governing permissions and +/// limitations under the License. +/// +/// Copyright holder is ArangoDB GmbH, Cologne, Germany +/// +/// @author Jan Steemann +/// @author Copyright 2014, ArangoDB GmbH, Cologne, Germany +/// @author Copyright 2012-2013, triAGENS GmbH, Cologne, Germany +//////////////////////////////////////////////////////////////////////////////// + +#ifndef ARANGODB_AQL_PLAN_GENERATOR_H +#define ARANGODB_AQL_PLAN_GENERATOR_H 1 + +#include "Basics/Common.h" +#include "Aql/Ast.h" +#include "Aql/AstNode.h" +#include "Aql/Variable.h" +#include "BasicsC/json.h" + +#include + +namespace triagens { + namespace aql { + +// ----------------------------------------------------------------------------- +// --SECTION-- class PlanGenerator +// ----------------------------------------------------------------------------- + + class PlanGenerator { + +// ----------------------------------------------------------------------------- +// --SECTION-- constructors / destructors +// ----------------------------------------------------------------------------- + + public: + +//////////////////////////////////////////////////////////////////////////////// +/// @brief create the generator +//////////////////////////////////////////////////////////////////////////////// + + PlanGenerator (); + +//////////////////////////////////////////////////////////////////////////////// +/// @brief destroy the generator +//////////////////////////////////////////////////////////////////////////////// + + ~PlanGenerator (); + +// ----------------------------------------------------------------------------- +// --SECTION-- public methods +// ----------------------------------------------------------------------------- + + public: + +// ----------------------------------------------------------------------------- +// --SECTION-- private methods +// ----------------------------------------------------------------------------- + + private: + +// ----------------------------------------------------------------------------- +// --SECTION-- private variables +// ----------------------------------------------------------------------------- + + private: + + }; + + } +} + +#endif + +// ----------------------------------------------------------------------------- +// --SECTION-- END-OF-FILE +// ----------------------------------------------------------------------------- + +// Local Variables: +// mode: outline-minor +// outline-regexp: "/// @brief\\|/// {@inheritDoc}\\|/// @page\\|// --SECTION--\\|/// @\\}" +// End: diff --git a/arangod/CMakeLists.txt b/arangod/CMakeLists.txt index 98bf9c97e4..264b9100d6 100644 --- a/arangod/CMakeLists.txt +++ b/arangod/CMakeLists.txt @@ -64,6 +64,7 @@ add_executable( Aql/ExecutionPlan.cpp Aql/grammar.cpp Aql/Parser.cpp + Aql/PlanGenerator.cpp Aql/Query.cpp Aql/Scopes.cpp Aql/tokens.cpp diff --git a/arangod/Makefile.files b/arangod/Makefile.files index 4853f73912..3d64eeee0b 100644 --- a/arangod/Makefile.files +++ b/arangod/Makefile.files @@ -45,6 +45,7 @@ arangod_libarangod_a_SOURCES = \ arangod/Aql/ExecutionPlan.cpp \ arangod/Aql/grammar.cpp \ arangod/Aql/Parser.cpp \ + arangod/Aql/PlanGenerator.cpp \ arangod/Aql/Query.cpp \ arangod/Aql/Scopes.cpp \ arangod/Aql/tokens.cpp \