exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

commit dc81d01304e3cf93c4ae86ab8c11fa778aff583f
parent c8e485088b0139c56edd45ab20ae6d7cfc196dbc
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sun, 30 Jul 2023 17:20:20 +0200

add missing prepared statements

Diffstat:
Msrc/exchangedb/pg_add_policy_fulfillment_proof.c | 22++++++++++++++++++++--
1 file changed, 20 insertions(+), 2 deletions(-)

diff --git a/src/exchangedb/pg_add_policy_fulfillment_proof.c b/src/exchangedb/pg_add_policy_fulfillment_proof.c @@ -94,7 +94,15 @@ TEH_PG_add_policy_fulfillment_proof ( GNUNET_PQ_result_spec_end }; - // FIXME: where do we prepare this statement!?? + PREPARE (pg, + "insert_proof_into_policy_fulfillments", + "INSERT INTO policy_fulfillments" + "(fulfillment_timestamp" + ",fulfillment_proof" + ",h_fulfillment_proof" + ",policy_hash_codes" + ") VALUES ($1, $2, $3, $4)" + " ON CONFLICT DO NOTHING;"); qs = GNUNET_PQ_eval_prepared_singleton_select (pg->conn, "insert_proof_into_policy_fulfillments", params, @@ -124,7 +132,17 @@ TEH_PG_add_policy_fulfillment_proof ( GNUNET_PQ_query_param_end }; - // FIXME: where do we prepare this statement!?? + // FIXME-Oec: review if this is the intended logic here! + PREPARE (pg, + "update_policy_details", + "UPDATE policy_details SET" + " deadline=$2" + ",commitment=$3" + ",accumulated_total=$4" + ",fee=$5" + ",transferable=$6" + ",fulfillment_state=$7" + " WHERE policy_hash_code=$1;"); qs = GNUNET_PQ_eval_prepared_non_select (pg->conn, "update_policy_details", params);