summaryrefslogtreecommitdiff
path: root/libpqpp/pq-cursorselectcommand.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2020-11-18 16:55:18 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2020-11-18 16:55:18 +0000
commit3bfa3dafe335479aade55507719071f7dceb0d8c (patch)
tree31d14618fc170a16f91f1f5c79e2ffd25f11b541 /libpqpp/pq-cursorselectcommand.cpp
parentFixes for tidy (diff)
downloadlibdbpp-postgresql-3bfa3dafe335479aade55507719071f7dceb0d8c.tar.bz2
libdbpp-postgresql-3bfa3dafe335479aade55507719071f7dceb0d8c.tar.xz
libdbpp-postgresql-3bfa3dafe335479aade55507719071f7dceb0d8c.zip
Clang format
Diffstat (limited to 'libpqpp/pq-cursorselectcommand.cpp')
-rw-r--r--libpqpp/pq-cursorselectcommand.cpp19
1 files changed, 8 insertions, 11 deletions
diff --git a/libpqpp/pq-cursorselectcommand.cpp b/libpqpp/pq-cursorselectcommand.cpp
index 820518f..1981bc8 100644
--- a/libpqpp/pq-cursorselectcommand.cpp
+++ b/libpqpp/pq-cursorselectcommand.cpp
@@ -7,14 +7,11 @@ AdHocFormatter(PQCursorSelectDeclare, "DECLARE %? NO SCROLL CURSOR WITH HOLD FOR
AdHocFormatter(PQCursorSelectFetch, "FETCH %? IN %?");
AdHocFormatter(PQCursorSelectClose, "CLOSE %?");
-PQ::CursorSelectCommand::CursorSelectCommand(Connection * conn, const std::string & sql, const PQ::CommandOptionsCPtr & pqco, const DB::CommandOptionsCPtr & opts) :
+PQ::CursorSelectCommand::CursorSelectCommand(Connection * conn, const std::string & sql,
+ const PQ::CommandOptionsCPtr & pqco, const DB::CommandOptionsCPtr & opts) :
DB::Command(sql),
- PQ::SelectBase(sql, pqco),
- PQ::Command(conn, sql, opts),
- executed(false),
- fTuples(pqco ? pqco->fetchTuples : 35),
- s_fetch(PQCursorSelectFetch::get(fTuples, stmntName)),
- s_close(PQCursorSelectClose::get(stmntName))
+ PQ::SelectBase(sql, pqco), PQ::Command(conn, sql, opts), executed(false), fTuples(pqco ? pqco->fetchTuples : 35),
+ s_fetch(PQCursorSelectFetch::get(fTuples, stmntName)), s_close(PQCursorSelectClose::get(stmntName))
{
}
@@ -41,8 +38,8 @@ PQ::CursorSelectCommand::execute()
if (s_declare.empty()) {
s_declare = mkdeclare();
}
- c->checkResultFree(
- PQexecParams(c->conn, s_declare.c_str(), values.size(), nullptr, &values.front(), &lengths.front(), &formats.front(), binary),
+ c->checkResultFree(PQexecParams(c->conn, s_declare.c_str(), values.size(), nullptr, &values.front(),
+ &lengths.front(), &formats.front(), binary),
PGRES_COMMAND_OK);
fetchTuples();
createColumns(execRes);
@@ -53,7 +50,8 @@ PQ::CursorSelectCommand::execute()
void
PQ::CursorSelectCommand::fetchTuples()
{
- execRes = c->checkResult(PQexecParams(c->conn, s_fetch.c_str(), 0, nullptr, nullptr, nullptr, nullptr, binary), PGRES_TUPLES_OK);
+ execRes = c->checkResult(
+ PQexecParams(c->conn, s_fetch.c_str(), 0, nullptr, nullptr, nullptr, nullptr, binary), PGRES_TUPLES_OK);
nTuples = PQntuples(execRes);
tuple = -1;
}
@@ -79,4 +77,3 @@ PQ::CursorSelectCommand::fetch()
return false;
}
}
-