From 99b84f8cb7c19ccddee954a14798f4577e53aa07 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 17 Oct 2015 22:11:44 +0100 Subject: Add support for getting last insert value --- libsqlitepp/connection.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libsqlitepp/connection.cpp') diff --git a/libsqlitepp/connection.cpp b/libsqlitepp/connection.cpp index 50df13e..3331024 100644 --- a/libsqlitepp/connection.cpp +++ b/libsqlitepp/connection.cpp @@ -126,3 +126,9 @@ SQLite::Connection::bulkUploadData(const char *, size_t) const throw Error("Not implemented"); } +int64_t +SQLite::Connection::insertId() const +{ + return sqlite3_last_insert_rowid(db); +} + -- cgit v1.2.3