Line data Source code
1 : /*
2 : This file is part of TALER
3 : Copyright (C) 2015, 2016 Taler Systems SA
4 :
5 : TALER is free software; you can redistribute it and/or modify it under the
6 : terms of the GNU General Public License as published by the Free Software
7 : Foundation; either version 3, or (at your option) any later version.
8 :
9 : TALER is distributed in the hope that it will be useful, but WITHOUT ANY
10 : WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 : A PARTICULAR PURPOSE. See the GNU General Public License for more details.
12 :
13 : You should have received a copy of the GNU General Public License along with
14 : TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
15 : */
16 : /**
17 : * @file auditordb/helper.c
18 : * @brief helper function
19 : * @author Christian Grothoff
20 : * @author Sree Harsha Totakura <sreeharsha@totakura.in>
21 : */
22 : #include "taler/taler_auditordb_lib.h"
23 : #include <ltdl.h>
24 : #include "pg_helper.h"
25 :
26 :
27 : const char *
28 0 : TALER_AUDITORDB_get_deletable_suppressable_table_name (
29 : enum TALER_AUDITORDB_DeletableSuppressableTables table)
30 : {
31 0 : const char *tables[] = {
32 : "auditor_amount_arithmetic_inconsistency",
33 : "auditor_closure_lags",
34 : "auditor_progress",
35 : "auditor_bad_sig_losses",
36 : "auditor_coin_inconsistency",
37 : "auditor_denomination_key_validity_withdraw_inconsistency",
38 : "auditor_denomination_pending",
39 : "auditor_denomination_without_sig",
40 : "auditor_deposit_confirmations",
41 : "auditor_emergency",
42 : "auditor_emergency_by_count",
43 : "auditor_fee_time_inconsistency",
44 : "auditor_misattribution_in_inconsistency",
45 : "auditor_purse_not_closed_inconsistency",
46 : "auditor_refreshes_haning",
47 : "auditor_reserve_balance_insufficient_inconsistency",
48 : "auditor_reserve_balance_summary_wrong_inconsistency",
49 : "auditor_reserve_in_inconsistency",
50 : "auditor_reserve_not_closed_inconsistency",
51 : "auditor_row_inconsistency",
52 : "auditor_row_minor_inconsistency",
53 : "auditor_wire_format_inconsistency",
54 : "auditor_wire_out_inconsistency",
55 : NULL,
56 : };
57 :
58 0 : if ( (table < 0) ||
59 : (table >= TALER_AUDITORDB_DELETABLESUPPRESSABLE_TABLES_MAX))
60 : {
61 0 : GNUNET_break (0);
62 0 : return NULL;
63 : }
64 0 : return tables[table];
65 : }
|