EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FairDbStatement.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file FairDbStatement.h
1 #ifndef FAIRDBSTATEMENT
2 #define FAIRDBSTATEMENT
3 
4 
5 
6 #include <list>
7 
8 #include "TList.h"
9 #include "TString.h"
10 #include "TSQLStatement.h"
11 
12 #include "FairDb.h"
13 #include "FairDbConnection.h"
14 #include "FairDbExceptionLog.h"
15 
17 {
18  public:
19 
20 // Constructors and destructors.
22  virtual ~FairDbStatement();
23 
24 
25  FairDb::DbTypes GetDBType() const { return fDbType; }
26  std::list<TString> TestTranslateSQL(const TString& sql, FairDb::DbTypes type);
27 
28  TSQLStatement* ExecuteQuery(const TString& sql="");
29  Bool_t ExecuteUpdate( const TString& sql="");
30  Bool_t PrintExceptions(Int_t level = 3) const;
32  private:
34  void AppendExceptionLog(TSQLStatement* s) { if ( s ) { fExceptionLog.AddEntry(*s); } }
37  // functions
38  TSQLStatement* CreateProcessedStatement(const TString& sql="");
39  std::list<TString> TranslateSQL(const TString& sql);
40 
41  // data
45 
46  ClassDef(FairDbStatement,0) // Managed TSQL_Statement
47 
48 };
49 
50 #endif // FAIRDBSTATEMENT