summaryrefslogtreecommitdiff
path: root/src/database/postgresql_statement.hpp
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2018-01-14 21:44:22 +0100
committerlouiz’ <louiz@louiz.org>2018-01-14 21:44:22 +0100
commit3cd649023680bd49f9865fd62474d4db6a9d7c68 (patch)
tree120bc40d92e2a5d9323ef1e0652b6b38711ce4e2 /src/database/postgresql_statement.hpp
parentb4b9828de50c09fea5503b3b3ead2ae9d5144404 (diff)
downloadbiboumi-3cd649023680bd49f9865fd62474d4db6a9d7c68.tar.gz
biboumi-3cd649023680bd49f9865fd62474d4db6a9d7c68.tar.bz2
biboumi-3cd649023680bd49f9865fd62474d4db6a9d7c68.tar.xz
biboumi-3cd649023680bd49f9865fd62474d4db6a9d7c68.zip
Remove all the ugly database debug
Diffstat (limited to 'src/database/postgresql_statement.hpp')
-rw-r--r--src/database/postgresql_statement.hpp13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/database/postgresql_statement.hpp b/src/database/postgresql_statement.hpp
index 30c3ec2..571c8f1 100644
--- a/src/database/postgresql_statement.hpp
+++ b/src/database/postgresql_statement.hpp
@@ -96,12 +96,7 @@ private:
params.reserve(this->params.size());
for (const auto& param: this->params)
- {
- log_debug("param:", param);
- params.push_back(param.data());
- }
-
- log_debug("body: ", body);
+ params.push_back(param.data());
const int param_size = static_cast<int>(this->params.size());
this->result = PQexecParams(this->conn, this->body.data(),
param_size,
@@ -111,11 +106,7 @@ private:
nullptr,
0);
const auto status = PQresultStatus(this->result);
- if (status == PGRES_TUPLES_OK)
- {
- log_debug("PGRES_TUPLES_OK");
- }
- else if (status != PGRES_COMMAND_OK)
+ if (status != PGRES_TUPLES_OK && status != PGRES_COMMAND_OK)
{
log_error("Failed to execute command: ", PQresultErrorMessage(this->result));
return false;