diff options
-rw-r--r-- | libpqpp/pq-bulkselectcommand.cpp | 4 | ||||
-rw-r--r-- | libpqpp/pq-cursorselectcommand.cpp | 2 | ||||
-rw-r--r-- | libpqpp/pq-modifycommand.cpp | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/libpqpp/pq-bulkselectcommand.cpp b/libpqpp/pq-bulkselectcommand.cpp index 8c9e1f0..298261e 100644 --- a/libpqpp/pq-bulkselectcommand.cpp +++ b/libpqpp/pq-bulkselectcommand.cpp @@ -18,8 +18,8 @@ void PQ::BulkSelectCommand::execute() { if (!executed) { - execRes = c->checkResult(PQexecPrepared(c->conn, prepare(), static_cast<int>(values.size()), &values.front(), - &lengths.front(), &formats.front(), binary), + execRes = c->checkResult(PQexecPrepared(c->conn, prepare(), static_cast<int>(values.size()), values.data(), + lengths.data(), formats.data(), binary), PGRES_TUPLES_OK); nTuples = static_cast<decltype(nTuples)>(PQntuples(execRes)); tuple = static_cast<decltype(tuple)>(-1); diff --git a/libpqpp/pq-cursorselectcommand.cpp b/libpqpp/pq-cursorselectcommand.cpp index 96d3dc3..8d3a7bf 100644 --- a/libpqpp/pq-cursorselectcommand.cpp +++ b/libpqpp/pq-cursorselectcommand.cpp @@ -46,7 +46,7 @@ PQ::CursorSelectCommand::execute() s_declare = mkdeclare(); } c->checkResultFree(PQexecParams(c->conn, s_declare.c_str(), static_cast<int>(values.size()), nullptr, - &values.front(), &lengths.front(), &formats.front(), binary), + values.data(), lengths.data(), formats.data(), binary), PGRES_COMMAND_OK); fetchTuples(); createColumns(execRes); diff --git a/libpqpp/pq-modifycommand.cpp b/libpqpp/pq-modifycommand.cpp index 38c10f6..b29fda7 100644 --- a/libpqpp/pq-modifycommand.cpp +++ b/libpqpp/pq-modifycommand.cpp @@ -15,8 +15,8 @@ PQ::ModifyCommand::ModifyCommand(Connection * conn, const std::string & sql, con unsigned int PQ::ModifyCommand::execute(bool anc) { - PGresult * res = PQexecPrepared(c->conn, prepare(), static_cast<int>(values.size()), &values.front(), - &lengths.front(), &formats.front(), 0); + PGresult * res = PQexecPrepared( + c->conn, prepare(), static_cast<int>(values.size()), values.data(), lengths.data(), formats.data(), 0); c->checkResult(res, PGRES_COMMAND_OK, PGRES_TUPLES_OK); auto rows = atoi(PQcmdTuples(res)); PQclear(res); |