summaryrefslogtreecommitdiff
path: root/libpqpp/pq-command.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2016-12-31 04:59:00 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2016-12-31 04:59:00 +0000
commit4013f18f0e9f257e6c0d7ffecdec3cfc9bf0db0d (patch)
treed8e89ed8329c9367bf32c59584f6b659b81584ec /libpqpp/pq-command.cpp
parentMore complex approach to setting tables to unlogged to handle foreign key dep... (diff)
downloadlibdbpp-postgresql-4013f18f0e9f257e6c0d7ffecdec3cfc9bf0db0d.tar.bz2
libdbpp-postgresql-4013f18f0e9f257e6c0d7ffecdec3cfc9bf0db0d.tar.xz
libdbpp-postgresql-4013f18f0e9f257e6c0d7ffecdec3cfc9bf0db0d.zip
Do lots more work with compile time formatter instead runtime formatters
Diffstat (limited to 'libpqpp/pq-command.cpp')
-rw-r--r--libpqpp/pq-command.cpp5
1 files changed, 3 insertions, 2 deletions
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 <stdlib.h>
#include <string.h>
-#include <buffer.h>
+#include <compileTimeFormatter.h>
#include <boost/date_time/posix_time/posix_time.hpp>
+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)
{
}