diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-10-08 16:58:13 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-10-08 16:58:13 +0100 |
commit | 78d8eeadcf6642eb52b3b178d6da620b0bb34289 (patch) | |
tree | 4777a94e6438b79e146754c58ad81a7b6d2a4118 /libpqpp/pq-prepared.cpp | |
parent | Fix virtual/override attribute use (diff) | |
download | libdbpp-postgresql-78d8eeadcf6642eb52b3b178d6da620b0bb34289.tar.bz2 libdbpp-postgresql-78d8eeadcf6642eb52b3b178d6da620b0bb34289.tar.xz libdbpp-postgresql-78d8eeadcf6642eb52b3b178d6da620b0bb34289.zip |
Use unique_ptr for execution results
Diffstat (limited to 'libpqpp/pq-prepared.cpp')
-rw-r--r-- | libpqpp/pq-prepared.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libpqpp/pq-prepared.cpp b/libpqpp/pq-prepared.cpp index bf8bd08..8678c11 100644 --- a/libpqpp/pq-prepared.cpp +++ b/libpqpp/pq-prepared.cpp @@ -26,8 +26,8 @@ PQ::PreparedStatement::prepare() const } std::stringstream psql; prepareSql(psql, sql); - c->checkResultFree(PQprepare(c->conn, stmntName.c_str(), std::move(psql).str().c_str(), - static_cast<int>(values.size()), nullptr), + c->checkResult(PQprepare(c->conn, stmntName.c_str(), std::move(psql).str().c_str(), static_cast<int>(values.size()), + nullptr), PGRES_COMMAND_OK); return (pstmt = c->preparedStatements.insert({hash, stmntName}).first->second.c_str()); } |