OSDN Git Service

Merge branch 'master' of git.sourceforge.jp:/gitroot/eos/base
[eos/hostdependX86LINUX64.git] / include / DataBase.hh
1 #ifndef DATA_BASE_HH
2 #define DATA_BASE_HH
3
4 #include <pgsql/libpq-fe.h>
5 #include <pgsql/postgres_ext.h>
6
7 class DataBase{
8 protected:
9   PGconn *con;
10   PGresult *res;
11   char* host;
12   char* port;
13   char* dbName;
14 public:
15
16   DataBase();
17   void ConnectToDataBase();
18   void SetDataBaseInfo(char* hostN, char* portN, char* dbN);
19   void DisplayAll(PGresult *res);
20   void DropTable(char* TableName);
21   void DeleteTable(char* TableName);
22   void CloseDataBase();
23   void Exec(char* sql);
24   void ResClear();
25
26 };
27
28
29
30
31
32
33 #endif /* DATA_BASE_HH */