mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-12-29 07:07:14 +01:00
33 lines
553 B
C++
33 lines
553 B
C++
#ifndef PGSQL_CONNECTION
|
|
#define PGSQL_CONNECTION
|
|
|
|
#include "database/database.h"
|
|
|
|
//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;
|
|
};
|
|
|
|
//#undef IS_NUM
|
|
|
|
#endif |