00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef _TMWSERV_PQDATAPROVIDER_H_
00022 #define _TMWSERV_PQDATAPROVIDER_H_
00023
00024
00025 #include <iosfwd>
00026 #include <libpq-fe.h>
00027
00028 #include "dataprovider.h"
00029
00030 namespace dal
00031 {
00032
00033
00037 class PqDataProvider: public DataProvider
00038 {
00039 public:
00043 PqDataProvider(void)
00044 throw();
00045
00046
00050 ~PqDataProvider(void)
00051 throw();
00052
00053
00059 DbBackends
00060 getDbBackend(void) const
00061 throw();
00062
00063
00073 void
00074 connect(const std::string& dbName,
00075 const std::string& userName,
00076 const std::string& password);
00077
00078
00090 const RecordSet&
00091 execSql(const std::string& sql,
00092 const bool refresh = false);
00093
00094
00100 void
00101 disconnect(void);
00102
00103
00104 private:
00105 PGconn *mDb;
00106 };
00107
00108
00109 }
00110
00111 #endif // _TMWSERV_PQDATAPROVIDER_H_