diff options
Diffstat (limited to 'src/auditordb/pg_get_row_inconsistency.c')
-rw-r--r-- | src/auditordb/pg_get_row_inconsistency.c | 41 |
1 files changed, 22 insertions, 19 deletions
diff --git a/src/auditordb/pg_get_row_inconsistency.c b/src/auditordb/pg_get_row_inconsistency.c index 67f83f6ed..f90d1cf0e 100644 --- a/src/auditordb/pg_get_row_inconsistency.c +++ b/src/auditordb/pg_get_row_inconsistency.c @@ -107,12 +107,12 @@ TAH_PG_get_row_inconsistency ( { struct PostgresClosure *pg = cls; - struct GNUNET_PQ_QueryParam params[] = { - GNUNET_PQ_query_param_uint64 (&offset), - GNUNET_PQ_query_param_bool (return_suppressed), - GNUNET_PQ_query_param_int64 (&limit), - GNUNET_PQ_query_param_end - }; + struct GNUNET_PQ_QueryParam params[] = { + GNUNET_PQ_query_param_uint64 (&offset), + GNUNET_PQ_query_param_bool (return_suppressed), + GNUNET_PQ_query_param_int64 (&limit), + GNUNET_PQ_query_param_end + }; struct RowInconsistencyContext dcc = { .cb = cb, .cb_cls = cb_cls, @@ -133,20 +133,23 @@ TAH_PG_get_row_inconsistency ( " ORDER BY row_id DESC" " LIMIT $3" ); - PREPARE (pg, - "auditor_row_inconsistency_select_asc", - "SELECT" - " row_id" - ",row_table" - ",diagnostic" - " FROM auditor_row_inconsistency" - " WHERE (row_id > $1)" - " AND ($2 OR suppressed is false)" - " ORDER BY row_id DESC" - " LIMIT $3" - ); + PREPARE (pg, + "auditor_row_inconsistency_select_asc", + "SELECT" + " row_id" + ",row_table" + ",diagnostic" + " FROM auditor_row_inconsistency" + " WHERE (row_id > $1)" + " AND ($2 OR suppressed is false)" + " ORDER BY row_id DESC" + " LIMIT $3" + ); qs = GNUNET_PQ_eval_prepared_multi_select (pg->conn, - (limit > 0) ? "auditor_row_inconsistency_select_asc" : "auditor_row_inconsistency_select_desc", + (limit > 0) ? + "auditor_row_inconsistency_select_asc" + : + "auditor_row_inconsistency_select_desc", params, &row_inconsistency_cb, &dcc); |