CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DbTransaction.h
Go to the documentation of this file.
1 #ifndef CondCore_DBCommon_DbTransaction_H
2 #define CondCore_DBCommon_DbTransaction_H
3 
4 //
5 // Package: DBCommon
6 // Class : DbTransaction
7 //
11 //
12 //
13 
14 namespace ora {
15  class Transaction;
16 }
17 
18 namespace cond{
19  class DbTransaction {
20 
21  public:
22  DbTransaction( ora::Transaction& dbTrans );
23 
26  int start(bool readOnly = false);
28  int commit();
30  bool forceCommit();
32  bool rollback();
34  int isActive() const;
36  bool isReadOnly() const;
37  private:
39  bool m_readOnly;
40  int m_clients;
41 
42  };
43 }
44 #endif
bool rollback()
rollback transaction
int isActive() const
current transaction is active
int commit()
commit transaction.
int start(bool readOnly=false)
start transaction
bool forceCommit()
force the commit, regardless to the transaction clients
DbTransaction(ora::Transaction &dbTrans)
Definition: DbTransaction.cc:8
bool isReadOnly() const
current transaction is readonly
ora::Transaction & m_dbTrans
Definition: DbTransaction.h:38