summaryrefslogtreecommitdiff
path: root/libmysqlpp/connection.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2015-10-17 22:11:44 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2015-10-20 01:40:55 +0100
commit5ceff5fb8d1f1c9edcd53f73fe4bcc4029fc45a0 (patch)
tree676b2a3d320412b5e4b2cb28ac20e1c22c00add6 /libmysqlpp/connection.cpp
parentAdd override attributes (diff)
downloadlibdbpp-mysql-5ceff5fb8d1f1c9edcd53f73fe4bcc4029fc45a0.tar.bz2
libdbpp-mysql-5ceff5fb8d1f1c9edcd53f73fe4bcc4029fc45a0.tar.xz
libdbpp-mysql-5ceff5fb8d1f1c9edcd53f73fe4bcc4029fc45a0.zip
Add support for getting last insert value
Diffstat (limited to 'libmysqlpp/connection.cpp')
-rw-r--r--libmysqlpp/connection.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/libmysqlpp/connection.cpp b/libmysqlpp/connection.cpp
index d3457f5..fe3f51f 100644
--- a/libmysqlpp/connection.cpp
+++ b/libmysqlpp/connection.cpp
@@ -261,3 +261,9 @@ MySQL::Connection::bulkUploadData(const char * data, size_t len) const
return len;
}
+int64_t
+MySQL::Connection::insertId() const
+{
+ return mysql_insert_id(&conn);
+}
+