From 88c63c1eb011bb1f8f07d72d3e878a2471b39018 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Wed, 4 Jan 2017 17:50:22 +0000 Subject: Use bulk select not cursor select for getId, far fewer operations --- libpqpp/pq-connection.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libpqpp') diff --git a/libpqpp/pq-connection.cpp b/libpqpp/pq-connection.cpp index 21cbb5d..1fadde3 100644 --- a/libpqpp/pq-connection.cpp +++ b/libpqpp/pq-connection.cpp @@ -178,7 +178,7 @@ PQ::Connection::bulkUploadData(const char * data, size_t len) const int64_t PQ::Connection::insertId() { - CursorSelectCommand getId(this, "SELECT lastval()", pstmntNo++); + BulkSelectCommand getId(this, "SELECT lastval()", pstmntNo++, NULL); int64_t id = -1; while (getId.fetch()) { getId[0] >> id; -- cgit v1.2.3