CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TableRegister.h
Go to the documentation of this file.
1 #ifndef INCLUDE_ORA_TABLEREGISTER_H
2 #define INCLUDE_ORA_TABLEREGISTER_H
3 
4 //
5 #include <string>
6 #include <set>
7 #include <map>
8 #include <vector>
9 
10 namespace coral{
11  class ISchema;
12 }
13 
14 namespace ora {
15 
16  class TableRegister {
17 
18  public:
19 
20  explicit TableRegister( coral::ISchema& schema );
21 
22  virtual ~TableRegister();
23 
24  bool checkTable(const std::string& tableName);
25 
26  bool checkColumn(const std::string& tableName, const std::string& columnName);
27 
28  size_t numberOfColumns(const std::string& tableName);
29 
30  void insertTable(const std::string& tableName);
31 
32  bool insertColumn(const std::string& tableName, const std::string& columnName );
33 
34  bool insertColumns(const std::string& tableName, const std::vector<std::string>& columns );
35 
36  private:
37 
38  void init();
39 
40  private:
41 
42  coral::ISchema& m_schema;
43 
44  bool m_init;
45 
46  std::map<std::string,std::set<std::string> > m_register;
47 
49 
50  std::set<std::string>* m_currentColumns;
51 
52  };
53 
54 }
55 
56 #endif
TableRegister(coral::ISchema &schema)
Definition: TableRegister.cc:9
virtual ~TableRegister()
bool insertColumns(const std::string &tableName, const std::vector< std::string > &columns)
tuple schema
Definition: dataDML.py:2334
bool insertColumn(const std::string &tableName, const std::string &columnName)
size_t numberOfColumns(const std::string &tableName)
coral::ISchema & m_schema
Definition: TableRegister.h:42
const std::string * m_currentTable
Definition: TableRegister.h:48
std::set< std::string > * m_currentColumns
Definition: TableRegister.h:50
void insertTable(const std::string &tableName)
bool checkColumn(const std::string &tableName, const std::string &columnName)
tuple columns
Definition: mps_check.py:210
std::map< std::string, std::set< std::string > > m_register
Definition: TableRegister.h:46
bool checkTable(const std::string &tableName)