rcpp_framework/database/postgres/pgsql_database.h

33 lines
549 B
C
Raw Normal View History

2020-11-28 14:18:58 +01:00
#ifndef PGSQL_CONNECTION
#define PGSQL_CONNECTION
#include "core/database.h"
2020-11-28 14:18:58 +01:00
//Brynet has it aswell, and because of using namespace it is defined here aswell
//later this will be fixed better
//#ifdef IS_NUM
//#undef IS_NUM
//#endif
#include <libpq-fe.h>
class PGSQLDatabase : public Database {
public:
static Database *_creation_func();
static void _register();
static void _unregister();
PGSQLDatabase() :
Database() {
conn = PQconnectStart("");
}
~PGSQLDatabase() {
PQfinish(conn);
}
PGconn *conn;
2020-11-28 14:18:58 +01:00
};
//#undef IS_NUM
#endif