From 59f271ee0b0ef5171150cae8f70defa7b78215b5 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Wed, 27 May 2015 00:20:28 +0100 Subject: Override Connection::execute with a specific version that doesn't involve the roundtrip to prepare a statement for one time use only --- libpqpp/connection.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libpqpp/connection.cpp') diff --git a/libpqpp/connection.cpp b/libpqpp/connection.cpp index 283f3ce..77bdd10 100644 --- a/libpqpp/connection.cpp +++ b/libpqpp/connection.cpp @@ -75,6 +75,12 @@ PQ::Connection::inTx() const return txDepth; } +void +PQ::Connection::execute(const std::string & sql) const +{ + checkResultFree(PQexec(conn, sql.c_str()), PGRES_COMMAND_OK, PGRES_TUPLES_OK); +} + DB::BulkDeleteStyle PQ::Connection::bulkDeleteStyle() const { -- cgit v1.2.3