diff options
author | randomdan <randomdan@localhost> | 2011-02-17 20:42:53 +0000 |
---|---|---|
committer | randomdan <randomdan@localhost> | 2011-02-17 20:42:53 +0000 |
commit | c5f116af8c044883edf44311173a0c6c017b7d59 (patch) | |
tree | 1ec836764f704d6b39ad52bdddda7fcd35d642f5 /libpqpp/connection.h | |
parent | Fixes to compile with all gcc warnings as errors (diff) | |
download | libdbpp-postgresql-c5f116af8c044883edf44311173a0c6c017b7d59.tar.bz2 libdbpp-postgresql-c5f116af8c044883edf44311173a0c6c017b7d59.tar.xz libdbpp-postgresql-c5f116af8c044883edf44311173a0c6c017b7d59.zip |
Add check function for when a connection is finished with, but you don't want to close it
Use prepared statements only for modifications, use fetch instead for selects (doesn't load an entire record set)
Support varchar oid
Diffstat (limited to 'libpqpp/connection.h')
-rw-r--r-- | libpqpp/connection.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libpqpp/connection.h b/libpqpp/connection.h index 4b9b28e..b46151d 100644 --- a/libpqpp/connection.h +++ b/libpqpp/connection.h @@ -10,6 +10,7 @@ namespace PQ { Connection(const std::string & info); ~Connection(); + void finish() const; int beginTx() const; int commitTx() const; int rollbackTx() const; @@ -21,7 +22,7 @@ namespace PQ { DB::SelectCommand * newSelectCommand(const std::string & sql) const; DB::ModifyCommand * newModifyCommand(const std::string & sql) const; - void checkResult(PGresult * res, int expected) const; + PGresult * checkResult(PGresult * res, int expected) const; void checkResultFree(PGresult * res, int expected) const; PGconn * conn; @@ -31,6 +32,7 @@ namespace PQ { mutable unsigned int txDepth; mutable unsigned int pstmntNo; + mutable bool rolledback; }; } |