Fledge
An open source edge computing platform for industrial users
join.h
1 #ifndef _JOIN_H
2 #define _JOIN_H
3 /*
4  * Fledge storage client.
5  *
6  * Copyright (c) 2022 Dianomic Systems
7  *
8  * Released under the Apache 2.0 Licence
9  *
10  * Author: Mark Riddoch
11  */
12 #include <string>
13 
14 class Query;
15 
19 class Join {
20  public:
21  Join(const std::string& table, const std::string& on, Query *query) :
22  m_table(table), m_column(on), m_on(on), m_query(query)
23  {
24  };
25  Join(const std::string& table, const std::string& column, const std::string& on, Query *query) :
26  m_table(table), m_column(column), m_on(on), m_query(query)
27  {
28  };
29  ~Join();
30  const std::string toJSON() const;
31  private:
32  Join(const Join&);
33  Join& operator=(Join const&);
34  const std::string m_table;
35  const std::string m_column;
36  const std::string m_on;
37  Query *m_query;
38 };
39 #endif
40 
Storage layer query container.
Definition: query.h:25
const std::string toJSON() const
Convert a join clause to its JSON representation.
Definition: join.cpp:30
Join clause representation.
Definition: join.h:19
~Join()
Destructor fo rthe join clause.
Definition: join.cpp:20