From 29269c1cf7d49dd4596cde49682e350875cb51f1 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 31 Dec 2016 04:59:00 +0000 Subject: Do lots more work with compile time formatter instead runtime formatters --- libpqpp/pq-command.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'libpqpp/pq-command.cpp') diff --git a/libpqpp/pq-command.cpp b/libpqpp/pq-command.cpp index 14efa77..84eaa43 100644 --- a/libpqpp/pq-command.cpp +++ b/libpqpp/pq-command.cpp @@ -2,12 +2,13 @@ #include "pq-connection.h" #include #include -#include +#include #include +AdHocFormatter(PQCommondStatement, "pStatement_%?_%?"); PQ::Command::Command(Connection * conn, const std::string & sql, unsigned int no) : DB::Command(sql), - stmntName(stringbf("pStatement_%u_%p", no, this)), + stmntName(PQCommondStatement::get(no, this)), c(conn) { } -- cgit v1.2.3