aboutsummaryrefslogtreecommitdiff
path: root/odb/pgsql/statement.hxx
diff options
context:
space:
mode:
authorConstantin Michael <constantin@codesynthesis.com>2011-05-24 16:51:23 +0200
committerConstantin Michael <constantin@codesynthesis.com>2011-05-24 16:51:23 +0200
commitc1d1c5e4e6086e4d4c06d84ac5a4667ccd21afb0 (patch)
tree148fbff8cf94c7fe4163ae04700bd2ec58d317b2 /odb/pgsql/statement.hxx
parent4deb25a98c3324ed2e9e3e486ca15e10e755cb00 (diff)
Update insert_statement to use lastval() to get last insert id
Diffstat (limited to 'odb/pgsql/statement.hxx')
-rw-r--r--odb/pgsql/statement.hxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/odb/pgsql/statement.hxx b/odb/pgsql/statement.hxx
index c66ff9b..e4e29f9 100644
--- a/odb/pgsql/statement.hxx
+++ b/odb/pgsql/statement.hxx
@@ -149,7 +149,10 @@ namespace odb
execute ();
unsigned long long
- id ();
+ id ()
+ {
+ return id_;
+ }
private:
insert_statement (const insert_statement&);
@@ -159,7 +162,7 @@ namespace odb
binding& data_;
native_binding& native_data_;
- Oid oid_;
+ unsigned long long id_;
};
class LIBODB_PGSQL_EXPORT update_statement: public statement