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 "auditordb_lib.h"
23 : #include "pg_helper.h"
24 :
25 :
26 : const char *
27 0 : TALER_AUDITORDB_get_deletable_suppressable_table_name (
28 : enum TALER_AUDITORDB_DeletableSuppressableTables table)
29 : {
30 0 : const char *tables[] = {
31 : "auditor_amount_arithmetic_inconsistency",
32 : "auditor_closure_lags",
33 : "auditor_bad_sig_losses",
34 : "auditor_coin_inconsistency",
35 : "auditor_denomination_key_validity_withdraw_inconsistency",
36 : "auditor_denomination_pending",
37 : "auditor_denominations_without_sigs",
38 : "auditor_deposit_confirmations",
39 : "auditor_emergency",
40 : "auditor_emergency_by_count",
41 : "auditor_fee_time_inconsistency",
42 : "auditor_misattribution_in_inconsistency",
43 : "auditor_purse_not_closed_inconsistencies",
44 : "auditor_refreshes_hanging",
45 : "auditor_reserve_balance_insufficient_inconsistency",
46 : "auditor_reserve_balance_summary_wrong_inconsistency",
47 : "auditor_reserve_in_inconsistency",
48 : "auditor_reserve_not_closed_inconsistency",
49 : "auditor_row_inconsistency",
50 : "auditor_row_minor_inconsistencies",
51 : "auditor_wire_format_inconsistency",
52 : "auditor_wire_out_inconsistency",
53 : "auditor_kycauth_in_inconsistency",
54 : "auditor_aml_holds",
55 : "auditor_early_aggregations",
56 : "auditor_pending_deposits",
57 : NULL,
58 : };
59 :
60 0 : if ( (table < 0) ||
61 : (table >= TALER_AUDITORDB_DELETABLESUPPRESSABLE_TABLES_MAX))
62 : {
63 0 : GNUNET_break (0);
64 0 : return NULL;
65 : }
66 0 : return tables[table];
67 : }
|