]> git.stg.codes - stg.git/blob - projects/stargazer/plugins/store/db/pg_driver.h
Добавление исходников
[stg.git] / projects / stargazer / plugins / store / db / pg_driver.h
1 #ifndef __PG_DRIVER_H__
2 #define __PG_DRIVER_H__
3
4 #include <libpq-fe.h>
5
6 #include "base_db.h"
7
8 class PG_DRIVER : public BASE_DB {
9 public:
10     virtual ~PG_DRIVER();
11
12     virtual bool Connect();
13     virtual bool Disconnect();
14     virtual bool Query(const std::string &);
15     virtual bool Start();
16     virtual bool Commit();
17     virtual bool Rollback();
18
19     virtual BASE_DB::TUPLES GetResult() const;
20     virtual BASE_DB::TUPLE GetTuple(int n = 0) const;
21
22 private:
23     PGconn * conn;
24     PGresult * result;
25 };
26
27 #endif