Belle II Software
release-06-00-14
PostgreSQLInterface.h
1
/**************************************************************************
2
* basf2 (Belle II Analysis Software Framework) *
3
* Author: The Belle II Collaboration *
4
* *
5
* See git log for contributors and copyright holders. *
6
* This file is licensed under LGPL-3.0, see LICENSE.md. *
7
**************************************************************************/
8
#ifndef _Belle2_PostgreSQLInterface_hh
9
#define _Belle2_PostgreSQLInterface_hh
10
11
#include "daq/slc/database/DBInterface.h"
12
#include "daq/slc/system/Mutex.h"
13
14
typedef
struct
pg_conn PGconn;
15
typedef
struct
pg_result PGresult;
16
17
namespace
Belle2
{
23
class
PostgreSQLInterface
:
public
DBInterface
{
24
25
public
:
26
PostgreSQLInterface
(
const
std::string& host,
27
const
std::string& database,
28
const
std::string& user,
29
const
std::string& password,
30
int
port);
31
PostgreSQLInterface
();
32
virtual
~
PostgreSQLInterface
() {}
33
34
public
:
35
virtual
void
connect();
36
virtual
bool
isConnected();
37
virtual
void
execute_imp(
const
char
* command);
38
virtual
void
close();
39
virtual
void
clear();
40
virtual
DBRecordList loadRecords();
41
virtual
bool
checkTable(
const
std::string& tablename);
42
virtual
DBFieldTypeList getTableContents(
const
std::string& tablename);
43
44
private
:
45
PGconn* m_sq_conn;
46
PGresult* m_sq_result;
47
Mutex
m_mutex;
48
49
};
50
52
}
53
54
#endif
Belle2::DBInterface
Definition:
DBInterface.h:26
Belle2::Mutex
Definition:
Mutex.h:19
Belle2::PostgreSQLInterface
Definition:
PostgreSQLInterface.h:23
Belle2
Abstract base class for different kinds of events.
Definition:
MillepedeAlgorithm.h:17
daq
slc
psql
include
PostgreSQLInterface.h
Generated on Thu Jul 14 2022 07:56:55 for Belle II Software by
1.9.1