aboutsummaryrefslogtreecommitdiff
path: root/src/auditordb/pg_helper.c
blob: a3664aab18dc4c17f2bd6d01590f2ec27a4700d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/*
  This file is part of TALER
  Copyright (C) 2015, 2016 Taler Systems SA

  TALER is free software; you can redistribute it and/or modify it under the
  terms of the GNU General Public License as published by the Free Software
  Foundation; either version 3, or (at your option) any later version.

  TALER is distributed in the hope that it will be useful, but WITHOUT ANY
  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
  A PARTICULAR PURPOSE.  See the GNU General Public License for more details.

  You should have received a copy of the GNU General Public License along with
  TALER; see the file COPYING.  If not, see <http://www.gnu.org/licenses/>
*/
/**
 * @file auditordb/auditordb_plugin.c
 * @brief Logic to load database plugin
 * @author Christian Grothoff
 * @author Sree Harsha Totakura <sreeharsha@totakura.in>
 */
#include "platform.h"
#include "taler_auditordb_plugin.h"
#include <ltdl.h>
#include "pg_helper.h"


const char *
TAH_PG_get_deletable_suppressable_table_name (enum
                                              TALER_AUDITORDB_DeletableSuppressableTables
                                              table)
{
  const char *tables[] = {
    "auditor_amount_arithmetic_inconsistency",
    "auditor_closure_lags",
    "auditor_progress",
    "auditor_bad_sig_losses",
    "auditor_coin_inconsistency",
    "auditor_denomination_key_validity_withdraw_inconsistency",
    "auditor_denomination_pending",
    "auditor_denomination_without_sig",
    "auditor_deposit_confirmations",
    "auditor_emergency",
    "auditor_emergency_by_count",
    "auditor_fee_time_inconsistency",
    "auditor_misattribution_in_inconsistency",
    "auditor_purse_not_closed_inconsistency",
    "auditor_refreshes_haning",
    "auditor_reserve_balance_insufficient_inconsistency",
    "auditor_reserve_balance_summary_wrong_inconsistency",
    "auditor_reserve_in_inconsistency",
    "auditor_reserve_not_closed_inconsistency",
    "auditor_row_inconsistency",
    "auditor_row_minor_inconsistency",
    "auditor_wire_format_inconsistency",
    "auditor_wire_out_inconsistency",
    NULL,
  };

  if ( (table < 0) ||
       (table >= TALER_AUDITORDB_DELETABLESUPPRESSABLE_TABLES_MAX))
  {
    GNUNET_break (0);
    return NULL;
  }
  return tables[table];
}