From 25a8f2a606dfbb1c4960f2ef1a14e64667e691d7 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Thu, 25 Feb 2016 22:24:53 +0000 Subject: Reuse prepared statements --- libpqpp/pq-connection.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libpqpp/pq-connection.h') diff --git a/libpqpp/pq-connection.h b/libpqpp/pq-connection.h index 59b200c..1e9f265 100644 --- a/libpqpp/pq-connection.h +++ b/libpqpp/pq-connection.h @@ -2,6 +2,7 @@ #define PQ_CONNECTION_H #include +#include #include #include #include "pq-error.h" @@ -14,6 +15,9 @@ namespace PQ { class DLL_PUBLIC Connection : public DB::Connection { public: + typedef std::hash::result_type StatementHash; + typedef std::map PreparedStatements; + Connection(const std::string & info); ~Connection(); @@ -38,6 +42,7 @@ namespace PQ { void checkResultFree(PGresult * res, int expected, int alternative = -1) const; PGconn * conn; + PreparedStatements preparedStatements; private: static bool checkResultInt(PGresult * res, int expected, int alternative); -- cgit v1.2.3