aboutsummaryrefslogtreecommitdiff
path: root/odb/pgsql/result-ptr.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'odb/pgsql/result-ptr.hxx')
-rw-r--r--odb/pgsql/result-ptr.hxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/odb/pgsql/result-ptr.hxx b/odb/pgsql/result-ptr.hxx
index 4cfe58d..2c5ee89 100644
--- a/odb/pgsql/result-ptr.hxx
+++ b/odb/pgsql/result-ptr.hxx
@@ -14,6 +14,12 @@
#include <odb/pgsql/details/export.hxx>
+//
+// Note: do not include this header into public headers (i.e., those
+// that may be included, directly or indirectly, by user code) because
+// it includes libpq-fe.h
+//
+
namespace odb
{
namespace pgsql
@@ -47,6 +53,14 @@ namespace odb
r_ = r;
}
+ PGresult*
+ release ()
+ {
+ PGresult* r (r_);
+ r_ = 0;
+ return r;
+ }
+
private:
result_ptr (const result_ptr&);
result_ptr& operator= (const result_ptr&);