db_bridge/include/postgresql_db.h
changeset 65 76514757b0d6
parent 64 993b97c4ad2d
child 66 2b4f786d9073
equal deleted inserted replaced
64:993b97c4ad2d 65:76514757b0d6
     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 <iostream>
       
    10 #include <abstract_db.h>
       
    11 
       
    12 #include <postgresql/libpq-fe.h>
       
    13 
       
    14 class PostgreSQL_DB:public Abstract_DB {
       
    15   private:
       
    16     PGconn * conn;
       
    17     PGresult *res;
       
    18     std::string conninfo;
       
    19 
       
    20   public:
       
    21     PostgreSQL_DB (std::string, std::string, std::string, std::string);
       
    22     virtual ~ PostgreSQL_DB ();
       
    23     bool connect ();
       
    24     Abstract_DB::DB_RESULT query (std::string);
       
    25 };
       
    26 #endif