db_bridge/include/postgresql_db.h
changeset 12 9f0ce4eaa1ce
child 14 862d63715611
equal deleted inserted replaced
11:0a8be4eac87e 12:9f0ce4eaa1ce
       
     1 /**
       
     2  * db_bridge/include/postgresql_db.h
       
     3  * Copyright 2008 (C) Markus Broeker
       
     4  */
       
     5 
       
     6 #ifndef POSTGRESQL_DB_H
       
     7 #define POSTGRESQL_DB_H
       
     8 
       
     9 #include <cstdlib>
       
    10 #include <iostream>
       
    11 #include <abstract_db.h>
       
    12 
       
    13 #include <postgresql/libpq-fe.h>
       
    14 
       
    15 class PostgreSQL_DB:public Abstract_DB {
       
    16   private:
       
    17     PGconn * conn;
       
    18     PGresult *res;
       
    19       std::string conninfo;
       
    20 
       
    21   public:
       
    22       PostgreSQL_DB (std::string, std::string, std::string, std::string);
       
    23       virtual ~ PostgreSQL_DB ();
       
    24       bool connect ();
       
    25       std::vector < std::vector <std::string> >query (std::string);
       
    26 };
       
    27 #endif