summaryrefslogtreecommitdiff
path: root/libpqpp/pq-connection.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2023-10-08 14:44:46 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2023-10-08 14:44:46 +0100
commit5ff1709a9e039ec155caecd6d0ea3c512f4be3cb (patch)
treec93c1e7c30bfae1b634911af0395ea9d5a40ea4e /libpqpp/pq-connection.cpp
parentUse proper defines for column types (diff)
downloadlibdbpp-postgresql-5ff1709a9e039ec155caecd6d0ea3c512f4be3cb.tar.bz2
libdbpp-postgresql-5ff1709a9e039ec155caecd6d0ea3c512f4be3cb.tar.xz
libdbpp-postgresql-5ff1709a9e039ec155caecd6d0ea3c512f4be3cb.zip
Reformat with new clang-format
Diffstat (limited to 'libpqpp/pq-connection.cpp')
-rw-r--r--libpqpp/pq-connection.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/libpqpp/pq-connection.cpp b/libpqpp/pq-connection.cpp
index 96e09f1..ee1ddf9 100644
--- a/libpqpp/pq-connection.cpp
+++ b/libpqpp/pq-connection.cpp
@@ -19,6 +19,7 @@
NAMEDFACTORY("postgresql", PQ::Connection, DB::ConnectionFactory)
static void setup() __attribute__((constructor(101)));
+
static void
setup()
{
@@ -92,6 +93,7 @@ PQ::Connection::ping() const
// NOLINTNEXTLINE(hicpp-signed-bitwise)
PQsocket(conn), POLLRDHUP | POLLERR | POLLHUP | POLLNVAL, 0
};
+
if (PQstatus(conn) != CONNECTION_OK || poll(&fd, 1, 0)) {
if (inTx()) {
throw ConnectionError(conn);
@@ -147,6 +149,7 @@ PQ::Connection::checkResultFree(PGresult * res, int expected, int alt) const
}
AdHocFormatter(PQConnectionCopyFrom, "COPY %? FROM STDIN %?");
+
void
PQ::Connection::beginBulkUpload(const char * table, const char * extra)
{
@@ -182,6 +185,7 @@ PQ::Connection::bulkUploadData(const char * data, size_t len) const
static const std::string selectLastVal("SELECT lastval()");
static const DB::CommandOptionsCPtr selectLastValOpts
= std::make_shared<DB::CommandOptions>(std::hash<std::string>()(selectLastVal));
+
int64_t
PQ::Connection::insertId()
{