summaryrefslogtreecommitdiff
path: root/lib/output/pq/pqStmt.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2021-07-13 20:18:09 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2021-07-14 01:33:36 +0100
commit964f7ec93c2b01aa2c3d171f01210df742dd0724 (patch)
treeb59e5959247821c290de88a9827485770a5df93d /lib/output/pq/pqStmt.cpp
parentSupress bad cppcheck suggestion (diff)
downloadmygrate-964f7ec93c2b01aa2c3d171f01210df742dd0724.tar.bz2
mygrate-964f7ec93c2b01aa2c3d171f01210df742dd0724.tar.xz
mygrate-964f7ec93c2b01aa2c3d171f01210df742dd0724.zip
Wider type support for PQ bindings
timespec not supported... honestly not sure what it should bind!
Diffstat (limited to 'lib/output/pq/pqStmt.cpp')
-rw-r--r--lib/output/pq/pqStmt.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/output/pq/pqStmt.cpp b/lib/output/pq/pqStmt.cpp
index 2265f64..7e085b5 100644
--- a/lib/output/pq/pqStmt.cpp
+++ b/lib/output/pq/pqStmt.cpp
@@ -22,7 +22,8 @@ namespace MyGrate::Output::Pq {
PqPrepStmt::execute(const std::initializer_list<DbValue> & vs)
{
Bindings b {vs};
- res = {PQexecPrepared(conn, name.c_str(), (int)vs.size(), b.values.data(), b.lengths.data(), nullptr, 0),
+ res = {PQexecPrepared(
+ conn, name.c_str(), (int)vs.size(), b.values.data(), b.lengths.data(), b.formats.data(), 0),
&PQclear};
verify<PqErr>(PQresultStatus(res.get()) == PGRES_COMMAND_OK || PQresultStatus(res.get()) == PGRES_TUPLES_OK,
name, conn);