summaryrefslogtreecommitdiff
path: root/libpqpp/connection.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2015-05-27 00:20:28 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2015-05-27 00:20:28 +0100
commit9c61567de78bab6e2ee2796832a8e584f2c034f0 (patch)
treed4e2b3a1cc5f78f6e88d827495aacbcfb6b4b361 /libpqpp/connection.cpp
parentAdd support for RDBMS boolean/bit types (diff)
downloadlibdbpp-postgresql-9c61567de78bab6e2ee2796832a8e584f2c034f0.tar.bz2
libdbpp-postgresql-9c61567de78bab6e2ee2796832a8e584f2c034f0.tar.xz
libdbpp-postgresql-9c61567de78bab6e2ee2796832a8e584f2c034f0.zip
Override Connection::execute with a specific version that doesn't involve the roundtrip to prepare a statement for one time use only
Diffstat (limited to 'libpqpp/connection.cpp')
-rw-r--r--libpqpp/connection.cpp6
1 files changed, 6 insertions, 0 deletions
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
{