diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2020-11-18 16:55:18 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2020-11-18 16:55:18 +0000 |
commit | 3bfa3dafe335479aade55507719071f7dceb0d8c (patch) | |
tree | 31d14618fc170a16f91f1f5c79e2ffd25f11b541 /libpqpp/pq-modifycommand.cpp | |
parent | Fixes for tidy (diff) | |
download | libdbpp-postgresql-3bfa3dafe335479aade55507719071f7dceb0d8c.tar.bz2 libdbpp-postgresql-3bfa3dafe335479aade55507719071f7dceb0d8c.tar.xz libdbpp-postgresql-3bfa3dafe335479aade55507719071f7dceb0d8c.zip |
Clang format
Diffstat (limited to 'libpqpp/pq-modifycommand.cpp')
-rw-r--r-- | libpqpp/pq-modifycommand.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/libpqpp/pq-modifycommand.cpp b/libpqpp/pq-modifycommand.cpp index 797c678..4c25a7e 100644 --- a/libpqpp/pq-modifycommand.cpp +++ b/libpqpp/pq-modifycommand.cpp @@ -1,19 +1,18 @@ #include "pq-modifycommand.h" +#include "pq-connection.h" #include "pq-error.h" #include <cstdlib> -#include "pq-connection.h" PQ::ModifyCommand::ModifyCommand(Connection * conn, const std::string & sql, const DB::CommandOptionsCPtr & opts) : - DB::Command(sql), - DB::ModifyCommand(sql), - PQ::PreparedStatement(conn, sql, opts) + DB::Command(sql), DB::ModifyCommand(sql), PQ::PreparedStatement(conn, sql, opts) { } unsigned int PQ::ModifyCommand::execute(bool anc) { - PGresult * res = PQexecPrepared(c->conn, prepare(), values.size(), &values.front(), &lengths.front(), &formats.front(), 0); + PGresult * res + = PQexecPrepared(c->conn, prepare(), values.size(), &values.front(), &lengths.front(), &formats.front(), 0); c->checkResult(res, PGRES_COMMAND_OK, PGRES_TUPLES_OK); unsigned int rows = atoi(PQcmdTuples(res)); PQclear(res); @@ -22,4 +21,3 @@ PQ::ModifyCommand::execute(bool anc) } return rows; } - |