From 5c47343b4011e64f841f08a8c49e1875474f94cc Mon Sep 17 00:00:00 2001 From: Nathan van Doorn Date: Mon, 5 Jul 2021 19:45:25 +0100 Subject: [PATCH] Fix deprecation warnings with libpqxx usage --- src/hydra-evaluator/hydra-evaluator.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/hydra-evaluator/hydra-evaluator.cc b/src/hydra-evaluator/hydra-evaluator.cc index 9a852536..2d7e68d9 100644 --- a/src/hydra-evaluator/hydra-evaluator.cc +++ b/src/hydra-evaluator/hydra-evaluator.cc @@ -233,12 +233,12 @@ struct Evaluator pqxx::work txn(*conn); if (jobset.evaluation_style == EvaluationStyle::ONE_AT_A_TIME) { - auto evaluation_res = txn.parameterized + auto evaluation_res = txn.exec_params ("select id from JobsetEvals " "where jobset_id = $1 " - "order by id desc limit 1") - (jobset.name.id) - .exec(); + "order by id desc limit 1" + ,jobset.name.id + ); if (evaluation_res.empty()) { // First evaluation, so allow scheduling. @@ -249,15 +249,15 @@ struct Evaluator auto evaluation_id = evaluation_res[0][0].as(); - auto unfinished_build_res = txn.parameterized + auto unfinished_build_res = txn.exec_params ("select id from Builds " "join JobsetEvalMembers " " on (JobsetEvalMembers.build = Builds.id) " "where JobsetEvalMembers.eval = $1 " " and builds.finished = 0 " - " limit 1") - (evaluation_id) - .exec(); + " limit 1" + ,evaluation_id + ); // If the previous evaluation has no unfinished builds // schedule!