Belle II Software
release-05-01-25
PostgreSQLInterface.h
1
#ifndef _Belle2_PostgreSQLInterface_hh
2
#define _Belle2_PostgreSQLInterface_hh
3
4
#include "daq/slc/database/DBInterface.h"
5
#include "daq/slc/system/Mutex.h"
6
7
typedef
struct
pg_conn PGconn;
8
typedef
struct
pg_result PGresult;
9
10
namespace
Belle2
{
16
class
PostgreSQLInterface
:
public
DBInterface
{
17
18
public
:
19
PostgreSQLInterface
(
const
std::string& host,
20
const
std::string& database,
21
const
std::string& user,
22
const
std::string& password,
23
int
port);
24
PostgreSQLInterface
();
25
virtual
~
PostgreSQLInterface
() {}
26
27
public
:
28
virtual
void
connect();
29
virtual
bool
isConnected();
30
virtual
void
execute_imp(
const
char
* command);
31
virtual
void
close();
32
virtual
void
clear();
33
virtual
DBRecordList loadRecords();
34
virtual
bool
checkTable(
const
std::string& tablename);
35
virtual
DBFieldTypeList getTableContents(
const
std::string& tablename);
36
37
private
:
38
PGconn* m_sq_conn;
39
PGresult* m_sq_result;
40
Mutex
m_mutex;
41
42
};
43
45
}
46
47
#endif
Belle2::Mutex
Definition:
Mutex.h:12
Belle2
Abstract base class for different kinds of events.
Definition:
MillepedeAlgorithm.h:19
Belle2::PostgreSQLInterface
Definition:
PostgreSQLInterface.h:16
Belle2::DBInterface
Definition:
DBInterface.h:19
daq
slc
psql
include
PostgreSQLInterface.h
Generated on Fri Nov 5 2021 03:50:05 for Belle II Software by
1.8.17