Flex  0.17.9
cypher_read_app.h
Go to the documentation of this file.
1 
16 #ifndef ENGINES_GRAPH_DB_CYPHER_READ_APP_H_
17 #define ENGINES_GRAPH_DB_CYPHER_READ_APP_H_
20 #include "flex/engines/graph_db/runtime/execute/pipeline.h"
21 #include "flex/proto_generated_gie/physical.pb.h"
22 
23 namespace gs {
24 class CypherReadApp : public ReadAppBase {
25  public:
26  CypherReadApp(const GraphDB& db) : db_(db) {}
27 
28  AppType type() const override { return AppType::kCypherAdhoc; }
29 
30  bool Query(const GraphDBSession& graph, Decoder& input,
31  Encoder& output) override;
32 
33  const runtime::OprTimer& timer() const { return timer_; }
34  runtime::OprTimer& timer() { return timer_; }
35 
36  private:
37  const GraphDB& db_;
38  std::unordered_map<std::string, physical::PhysicalPlan> plan_cache_;
39  std::unordered_map<std::string, runtime::ReadPipeline> pipeline_cache_;
40  runtime::OprTimer timer_;
41 };
42 
44  public:
45  CypherReadAppFactory() = default;
46  ~CypherReadAppFactory() = default;
47 
48  AppWrapper CreateApp(const GraphDB& db) override;
49 };
50 
51 } // namespace gs
52 #endif // ENGINES_GRAPH_DB_CYPHER_READ_APP_H_
graph_db_session.h
gs::CypherReadAppFactory
Definition: cypher_read_app.h:43
gs::CypherReadApp::CypherReadApp
CypherReadApp(const GraphDB &db)
Definition: cypher_read_app.h:26
gs::CypherReadAppFactory::~CypherReadAppFactory
~CypherReadAppFactory()=default
gs::CypherReadApp::timer_
runtime::OprTimer timer_
Definition: cypher_read_app.h:40
gs
Definition: adj_list.h:23
gs::CypherReadApp
Definition: cypher_read_app.h:24
gs::Encoder
Definition: app_utils.h:25
gs::Decoder
Definition: app_utils.h:69
gs::CypherReadApp::timer
runtime::OprTimer & timer()
Definition: cypher_read_app.h:34
gs::CypherReadApp::type
AppType type() const override
Definition: cypher_read_app.h:28
gs::GraphDBSession
Definition: graph_db_session.h:36
gs::GraphDB
Definition: graph_db.h:77
gs::CypherReadApp::timer
const runtime::OprTimer & timer() const
Definition: cypher_read_app.h:33
gs::CypherReadApp::Query
bool Query(const GraphDBSession &graph, Decoder &input, Encoder &output) override
Definition: cypher_read_app.cc:11
gs::CypherReadApp::plan_cache_
std::unordered_map< std::string, physical::PhysicalPlan > plan_cache_
Definition: cypher_read_app.h:38
gs::CypherReadApp::pipeline_cache_
std::unordered_map< std::string, runtime::ReadPipeline > pipeline_cache_
Definition: cypher_read_app.h:39
gs::ReadAppBase
Definition: app_base.h:55
gs::CypherReadApp::db_
const GraphDB & db_
Definition: cypher_read_app.h:37
gs::AppWrapper
Definition: app_base.h:78
gs::AppBase::AppType::kCypherAdhoc
@ kCypherAdhoc
app_base.h
gs::AppBase::AppType
AppType
Definition: app_base.h:37
gs::CypherReadAppFactory::CypherReadAppFactory
CypherReadAppFactory()=default
gs::CypherReadAppFactory::CreateApp
AppWrapper CreateApp(const GraphDB &db) override
Definition: cypher_read_app.cc:114
gs::AppFactoryBase
Definition: app_base.h:115