summaryrefslogtreecommitdiff
path: root/src/auditordb/pg_get_reserve_in_inconsistency.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/auditordb/pg_get_reserve_in_inconsistency.c')
-rw-r--r--src/auditordb/pg_get_reserve_in_inconsistency.c59
1 files changed, 28 insertions, 31 deletions
diff --git a/src/auditordb/pg_get_reserve_in_inconsistency.c b/src/auditordb/pg_get_reserve_in_inconsistency.c
index 22950f537..1ad3559ac 100644
--- a/src/auditordb/pg_get_reserve_in_inconsistency.c
+++ b/src/auditordb/pg_get_reserve_in_inconsistency.c
@@ -1,6 +1,3 @@
-
-
-
/*
This file is part of TALER
Copyright (C) 2024 Taler Systems SA
@@ -63,8 +60,8 @@ struct ReserveInInconsistencyContext
*/
static void
reserve_in_inconsistency_cb (void *cls,
- PGresult *result,
- unsigned int num_results)
+ PGresult *result,
+ unsigned int num_results)
{
struct ReserveInInconsistencyContext *dcc = cls;
struct PostgresClosure *pg = dcc->pg;
@@ -79,13 +76,14 @@ reserve_in_inconsistency_cb (void *cls,
GNUNET_PQ_result_spec_uint64 ("row_id", &serial_id),
- TALER_PQ_RESULT_SPEC_AMOUNT("amount_exchange_expected", &dc.amount_exchange_expected),
-TALER_PQ_RESULT_SPEC_AMOUNT("amount_wired", &dc.amount_wired),
-GNUNET_PQ_result_spec_auto_from_type("reserve_pub", &dc.reserve_pub),
-GNUNET_PQ_result_spec_int64("timestamp", &dc.timestamp),
-GNUNET_PQ_result_spec_auto_from_type("account", &dc.account),
-GNUNET_PQ_result_spec_auto_from_type("diagnostic", &dc.diagnostic),
-GNUNET_PQ_result_spec_bool("suppressed", &dc.suppressed),
+ TALER_PQ_RESULT_SPEC_AMOUNT ("amount_exchange_expected",
+ &dc.amount_exchange_expected),
+ TALER_PQ_RESULT_SPEC_AMOUNT ("amount_wired", &dc.amount_wired),
+ GNUNET_PQ_result_spec_auto_from_type ("reserve_pub", &dc.reserve_pub),
+ GNUNET_PQ_result_spec_int64 ("timestamp", &dc.timestamp),
+ GNUNET_PQ_result_spec_auto_from_type ("account", &dc.account),
+ GNUNET_PQ_result_spec_auto_from_type ("diagnostic", &dc.diagnostic),
+ GNUNET_PQ_result_spec_bool ("suppressed", &dc.suppressed),
GNUNET_PQ_result_spec_end
@@ -142,13 +140,13 @@ TAH_PG_get_reserve_in_inconsistency (
"auditor_reserve_in_inconsistency_get_desc",
"SELECT"
" row_id,"
-" amount_exchange_expected,"
-" amount_wired,"
-" reserve_pub,"
-" timestamp,"
-" account,"
-" diagnostic,"
-" suppressed"
+ " amount_exchange_expected,"
+ " amount_wired,"
+ " reserve_pub,"
+ " timestamp,"
+ " account,"
+ " diagnostic,"
+ " suppressed"
" FROM auditor_reserve_in_inconsistency"
" WHERE (row_id < $1)"
" AND ($2 OR suppressed is false)"
@@ -159,13 +157,13 @@ TAH_PG_get_reserve_in_inconsistency (
"auditor_reserve_in_inconsistency_get_asc",
"SELECT"
" row_id,"
-" amount_exchange_expected,"
-" amount_wired,"
-" reserve_pub,"
-" timestamp,"
-" account,"
-" diagnostic,"
-" suppressed"
+ " amount_exchange_expected,"
+ " amount_wired,"
+ " reserve_pub,"
+ " timestamp,"
+ " account,"
+ " diagnostic,"
+ " suppressed"
" FROM auditor_reserve_in_inconsistency"
" WHERE (row_id > $1)"
" AND ($2 OR suppressed is false)"
@@ -174,8 +172,10 @@ TAH_PG_get_reserve_in_inconsistency (
);
qs = GNUNET_PQ_eval_prepared_multi_select (pg->conn,
(limit > 0)
- ? "auditor_reserve_in_inconsistency_get_asc"
- : "auditor_reserve_in_inconsistency_get_desc",
+ ?
+ "auditor_reserve_in_inconsistency_get_asc"
+ :
+ "auditor_reserve_in_inconsistency_get_desc",
params,
&reserve_in_inconsistency_cb,
&dcc);
@@ -185,6 +185,3 @@ TAH_PG_get_reserve_in_inconsistency (
GNUNET_break (GNUNET_DB_STATUS_HARD_ERROR != qs);
return qs;
}
-
-
- \ No newline at end of file