From f86b8d2e23339e27d416145ad7b660d66267e151 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Mon, 9 Apr 2018 12:06:17 +0100 Subject: C++17 Updates code largely in-keeping with updates to be C++17 in line with libadhocutil and libdbpp. --- libpqpp/pq-connection.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'libpqpp/pq-connection.cpp') diff --git a/libpqpp/pq-connection.cpp b/libpqpp/pq-connection.cpp index e189acf..214f211 100644 --- a/libpqpp/pq-connection.cpp +++ b/libpqpp/pq-connection.cpp @@ -96,20 +96,20 @@ PQ::Connection::ping() const } -DB::SelectCommand * -PQ::Connection::newSelectCommand(const std::string & sql, const DB::CommandOptions * opts) +DB::SelectCommandPtr +PQ::Connection::select(const std::string & sql, const DB::CommandOptions * opts) { auto pqco = dynamic_cast(opts); if (pqco && !pqco->useCursor) { - return new BulkSelectCommand(this, sql, pqco, opts); + return std::make_shared(this, sql, pqco, opts); } - return new CursorSelectCommand(this, sql, pqco, opts); + return std::make_shared(this, sql, pqco, opts); } -DB::ModifyCommand * -PQ::Connection::newModifyCommand(const std::string & sql, const DB::CommandOptions * opts) +DB::ModifyCommandPtr +PQ::Connection::modify(const std::string & sql, const DB::CommandOptions * opts) { - return new ModifyCommand(this, sql, opts); + return std::make_shared(this, sql, opts); } bool -- cgit v1.2.3