aboutsummaryrefslogtreecommitdiff
path: root/odb/pgsql/statement.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2011-08-30 16:10:02 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2011-08-30 16:10:30 +0200
commit9fce9a7250f63a2a3cceeb0aac7b22d5dd7e6915 (patch)
treedd20f89ddd286f663aaf881835970c03cc628855 /odb/pgsql/statement.hxx
parent44a26d189e186ac10c4a80c4dbb68d65927b12a9 (diff)
Implement uniform handle management across all databases
Also use the auto_handle template instead of the raw handle in connection, statement, and result classes. This removes a lot of brittle "exception safety guarantee" code that we had in those classes.
Diffstat (limited to 'odb/pgsql/statement.hxx')
-rw-r--r--odb/pgsql/statement.hxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/odb/pgsql/statement.hxx b/odb/pgsql/statement.hxx
index 11e04b3..6e5484a 100644
--- a/odb/pgsql/statement.hxx
+++ b/odb/pgsql/statement.hxx
@@ -15,7 +15,8 @@
#include <odb/pgsql/version.hxx>
#include <odb/pgsql/binding.hxx>
-#include <odb/pgsql/pgsql-fwd.hxx>
+#include <odb/pgsql/pgsql-fwd.hxx> // PGresult
+#include <odb/pgsql/auto-handle.hxx>
#include <odb/pgsql/details/export.hxx>
@@ -157,7 +158,7 @@ namespace odb
binding& data_;
- PGresult* result_;
+ auto_handle<PGresult> result_;
std::size_t row_count_;
std::size_t current_row_;
};