24 lines
475 B
C
24 lines
475 B
C
#ifndef _DBHANDLER_H_
|
|
#define _DBHANDLER_H_
|
|
|
|
#include <config.h>
|
|
#include <libpq-fe.h>
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
|
t_configHandle *configHandle;
|
|
const char *postgresqlConnInfo;
|
|
PGconn *conn;
|
|
} t_dbHandle;
|
|
|
|
|
|
t_dbHandle *initDatabaseHandler(t_configHandle *configHandle);
|
|
void deinitDatabaseHandler(t_dbHandle *handle);
|
|
|
|
|
|
int sendToDB(t_dbHandle *handle, const uint32_t experimentId, const uint32_t value,
|
|
const uint64_t timestamp);
|
|
|
|
#endif // __DBHANDLER_H_
|