CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
EcalDBConnection.h
Go to the documentation of this file.
1 #ifndef ECALDBCONNECTION_HH
2 #define ECALDBCONNECTION_HH
3 
5 #include <string>
6 #include <stdexcept>
7 #include <iostream>
8 
10 
16 public:
17  /******************\
18  - public methods -
19  \******************/
20 
26  false);
27 
32  EcalDBConnection(std::string sid, std::string user, std::string pass) noexcept(false);
33 
37  virtual ~EcalDBConnection() noexcept(false);
38 
42  inline oracle::occi::Statement* createStatement() {
43  std::cout << "Creating statement" << std::endl;
44  return conn->createStatement();
45  }
46 
47  inline void terminateStatement(oracle::occi::Statement* stmt) {
48  std::cout << "Creating statement" << std::endl;
49  conn->terminateStatement(stmt);
50  }
51 
55  inline void commit() { conn->commit(); }
56  inline void rollback() { conn->rollback(); }
57 
61  inline oracle::occi::Clob getClobLocator() { return oracle::occi::Clob(conn); }
62 
63  oracle::occi::Environment* getEnv() const { return env; };
64  oracle::occi::Connection* getConn() const { return conn; };
65 
66 protected:
67  /***********************\
68  - protected variables -
69  \***********************/
70 
71  oracle::occi::Environment* env;
72  oracle::occi::Connection* conn;
73  oracle::occi::Statement* stmt;
74 
76  int port;
80 };
81 
82 #endif
oracle::occi::Environment * env
oracle::occi::Environment * getEnv() const
oracle::occi::Connection * getConn() const
oracle::occi::Connection * conn
void terminateStatement(oracle::occi::Statement *stmt)
EcalDBConnection(std::string host, std::string sid, std::string user, std::string pass, int port=1521) noexcept(false)
oracle::occi::Statement * stmt
tuple cout
Definition: gather_cfg.py:144
oracle::occi::Statement * createStatement()
virtual ~EcalDBConnection() noexcept(false)
oracle::occi::Clob getClobLocator()