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_
AppType
Definition: app_base.h:37
Definition: app_base.h:115
Definition: app_base.h:78
Definition: cypher_read_app.h:43
AppWrapper CreateApp(const GraphDB &db) override
Definition: cypher_read_app.cc:114
Definition: cypher_read_app.h:24
runtime::OprTimer & timer()
Definition: cypher_read_app.h:34
bool Query(const GraphDBSession &graph, Decoder &input, Encoder &output) override
Definition: cypher_read_app.cc:11
const runtime::OprTimer & timer() const
Definition: cypher_read_app.h:33
const GraphDB & db_
Definition: cypher_read_app.h:37
CypherReadApp(const GraphDB &db)
Definition: cypher_read_app.h:26
std::unordered_map< std::string, physical::PhysicalPlan > plan_cache_
Definition: cypher_read_app.h:38
AppType type() const override
Definition: cypher_read_app.h:28
runtime::OprTimer timer_
Definition: cypher_read_app.h:40
std::unordered_map< std::string, runtime::ReadPipeline > pipeline_cache_
Definition: cypher_read_app.h:39
Definition: app_utils.h:69
Definition: app_utils.h:25
Definition: graph_db_session.h:36
Definition: graph_db.h:77
Definition: app_base.h:55
Definition: adj_list.h:23