aboutsummaryrefslogtreecommitdiff
path: root/src/auditordb/pg_update_purse_summary.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-11-02 17:51:42 +0100
committerChristian Grothoff <christian@grothoff.org>2022-11-02 17:51:42 +0100
commita51517f64c83c23545ebd8a935baa311f0de635a (patch)
tree8431dcad0c9aa743468b551828be021a1378f4a6 /src/auditordb/pg_update_purse_summary.c
parent5c0b8e32406a7e000396003e9428a1cf9af3e919 (diff)
downloadexchange-a51517f64c83c23545ebd8a935baa311f0de635a.tar.xz
-implement missing functions
Diffstat (limited to 'src/auditordb/pg_update_purse_summary.c')
-rw-r--r--src/auditordb/pg_update_purse_summary.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/auditordb/pg_update_purse_summary.c b/src/auditordb/pg_update_purse_summary.c
index b03f0f4fd..45afe2c8c 100644
--- a/src/auditordb/pg_update_purse_summary.c
+++ b/src/auditordb/pg_update_purse_summary.c
@@ -32,4 +32,22 @@ TAH_PG_update_purse_summary (
const struct TALER_MasterPublicKeyP *master_pub,
const struct TALER_AUDITORDB_PurseBalance *sum)
{
+ struct PostgresClosure *pg = cls;
+ struct GNUNET_PQ_QueryParam params[] = {
+ GNUNET_PQ_query_param_auto_from_type (master_pub),
+ TALER_PQ_query_param_amount (&sum->balance),
+ GNUNET_PQ_query_param_uint64 (&sum->open_purses),
+ GNUNET_PQ_query_param_end
+ };
+
+ PREPARE (pg,
+ "auditor_purse_summary_update",
+ "UPDATE auditor_purse_summary SET"
+ " balance_val=$2"
+ ",balance_frac=$3"
+ ",open_purses=$4"
+ " WHERE master_pub=$1;");
+ return GNUNET_PQ_eval_prepared_non_select (pg->conn,
+ "auditor_purse_summary_update",
+ params);
}