From 1bc8b0349266db6b076b3f04f79c4ec3e493b3d9 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 8 Jan 2017 15:38:38 +0000 Subject: Add the DB command options factory --- libpqpp/pq-command.cpp | 9 +++++++++ libpqpp/pq-command.h | 1 + 2 files changed, 10 insertions(+) (limited to 'libpqpp') diff --git a/libpqpp/pq-command.cpp b/libpqpp/pq-command.cpp index 5ff83f0..1db81a6 100644 --- a/libpqpp/pq-command.cpp +++ b/libpqpp/pq-command.cpp @@ -4,6 +4,9 @@ #include #include #include +#include + +NAMEDFACTORY("postgresql", PQ::CommandOptions, DB::CommandOptionsFactory); AdHocFormatter(PQCommondStatement, "pStatement_id%?"); PQ::Command::Command(Connection * conn, const std::string & sql, const DB::CommandOptions * opts) : @@ -26,6 +29,12 @@ PQ::Command::~Command() } } +PQ::CommandOptions::CommandOptions(std::size_t hash, const DB::CommandOptionsMap &) : + DB::CommandOptions(hash) +{ + +} + PQ::CommandOptions::CommandOptions(std::size_t hash, unsigned int ft, bool uc) : diff --git a/libpqpp/pq-command.h b/libpqpp/pq-command.h index e054da8..7612262 100644 --- a/libpqpp/pq-command.h +++ b/libpqpp/pq-command.h @@ -12,6 +12,7 @@ namespace PQ { class DLL_PUBLIC CommandOptions : public DB::CommandOptions { public: + CommandOptions(std::size_t, const DB::CommandOptionsMap &); CommandOptions(std::size_t hash, unsigned int fetchTuples = 35, bool useCursor = true); -- cgit v1.2.3