From 3bfa3dafe335479aade55507719071f7dceb0d8c Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Wed, 18 Nov 2020 16:55:18 +0000 Subject: Clang format --- libpqpp/pq-command.cpp | 29 +++++++++-------------------- 1 file changed, 9 insertions(+), 20 deletions(-) (limited to 'libpqpp/pq-command.cpp') diff --git a/libpqpp/pq-command.cpp b/libpqpp/pq-command.cpp index 147d988..98cd725 100644 --- a/libpqpp/pq-command.cpp +++ b/libpqpp/pq-command.cpp @@ -1,38 +1,28 @@ #include "pq-command.h" #include "pq-connection.h" +#include +#include #include #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::CommandOptionsCPtr & opts) : - DB::Command(sql), - hash(opts && opts->hash ? *opts->hash : std::hash()(sql)), - stmntName(PQCommondStatement::get(hash)), - c(conn) + DB::Command(sql), hash(opts && opts->hash ? *opts->hash : std::hash()(sql)), + stmntName(PQCommondStatement::get(hash)), c(conn) { } PQ::CommandOptions::CommandOptions(std::size_t hash, const DB::CommandOptionsMap & map) : - DB::CommandOptions(hash), - fetchTuples(get(map, "page-size", 35)), - useCursor(!isSet(map, "no-cursor")), + DB::CommandOptions(hash), fetchTuples(get(map, "page-size", 35)), useCursor(!isSet(map, "no-cursor")), fetchBinary(isSet(map, "fetch-binary")) { } -PQ::CommandOptions::CommandOptions(std::size_t hash, - unsigned int ft, - bool uc, - bool fb) : - DB::CommandOptions(hash), - fetchTuples(ft), - useCursor(uc), - fetchBinary(fb) +PQ::CommandOptions::CommandOptions(std::size_t hash, unsigned int ft, bool uc, bool fb) : + DB::CommandOptions(hash), fetchTuples(ft), useCursor(uc), fetchBinary(fb) { } @@ -72,9 +62,9 @@ PQ::Command::paramsAtLeast(unsigned int n) } AdHocFormatter(PQCommandParamFmt, "%?"); -template +template void -PQ::Command::paramSet(unsigned int n, const T & ... v) +PQ::Command::paramSet(unsigned int n, const T &... v) { paramsAtLeast(n); bufs[n] = std::make_unique(PQCommandParamFmt::get(v...)); @@ -176,4 +166,3 @@ PQ::Command::bindNull(unsigned int n) values[n] = nullptr; bufs[n].reset(); } - -- cgit v1.2.3