EIC Software
Reference for
EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
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
16
class
FairDbStatement
17
{
18
public
:
19
20
// Constructors and destructors.
21
FairDbStatement
(
FairDbConnection
& conDb);
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
;
31
const
FairDbExceptionLog
&
GetExceptionLog
()
const
{
return
fExceptionLog
; }
32
private
:
33
void
AppendExceptionLog
(
FairDbException
*
e
) {
if
( e ) {
fExceptionLog
.
AddEntry
(*e); } }
34
void
AppendExceptionLog
(TSQLStatement*
s
) {
if
( s ) {
fExceptionLog
.
AddEntry
(*s); } }
35
void
AppendExceptionLog
(
FairDbConnection
&
c
) {
fExceptionLog
.
AddLog
(c.
GetExceptionLog
()); }
36
void
ClearExceptionLog
() {
fExceptionLog
.
Clear
(); }
37
// functions
38
TSQLStatement*
CreateProcessedStatement
(
const
TString& sql=
""
);
39
std::list<TString>
TranslateSQL
(
const
TString& sql);
40
41
// data
42
FairDbConnection
&
fConDb
;
43
FairDb::DbTypes
fDbType
;
44
FairDbExceptionLog
fExceptionLog
;
45
46
ClassDef(
FairDbStatement
,0)
// Managed TSQL_Statement
47
48
};
49
50
#endif // FAIRDBSTATEMENT
EicRoot
blob
master
dbase
dbInterface
FairDbStatement.h
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:33
using
1.8.2 with
EIC GitHub integration