diff options
Diffstat (limited to 'src/mint/mint_db.h')
-rw-r--r-- | src/mint/mint_db.h | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/src/mint/mint_db.h b/src/mint/mint_db.h index a32cbd773..b36823803 100644 --- a/src/mint/mint_db.h +++ b/src/mint/mint_db.h | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <gnunet/gnunet_util_lib.h> | 27 | #include <gnunet/gnunet_util_lib.h> |
28 | #include "taler_util.h" | 28 | #include "taler_util.h" |
29 | 29 | ||
30 | #define TALER_TEMP_SCHEMA_NAME "taler_temporary" | ||
30 | 31 | ||
31 | /** | 32 | /** |
32 | * Initialize database subsystem. | 33 | * Initialize database subsystem. |
@@ -42,13 +43,33 @@ TALER_MINT_DB_init (const char *connection_cfg); | |||
42 | * Get the thread-local database-handle. | 43 | * Get the thread-local database-handle. |
43 | * Connect to the db if the connection does not exist yet. | 44 | * Connect to the db if the connection does not exist yet. |
44 | * | 45 | * |
46 | * @param temporary #GNUNET_YES to use a temporary schema; #GNUNET_NO to use the | ||
47 | * database default one | ||
45 | * @param the database connection, or NULL on error | 48 | * @param the database connection, or NULL on error |
46 | */ | 49 | */ |
47 | PGconn * | 50 | PGconn * |
48 | TALER_MINT_DB_get_connection (void); | 51 | TALER_MINT_DB_get_connection (int temporary); |
49 | 52 | ||
50 | 53 | ||
51 | /** | 54 | /** |
55 | * Drop the temporary taler schema. This is only useful for testcases | ||
56 | * | ||
57 | * @return #GNUNET_OK upon success; #GNUNET_SYSERR upon failure | ||
58 | */ | ||
59 | int | ||
60 | TALER_MINT_DB_drop_temporary (PGconn *db); | ||
61 | |||
62 | |||
63 | /** | ||
64 | * Create the necessary tables if they are not present | ||
65 | * | ||
66 | * @param temporary should we use a temporary schema | ||
67 | * @return #GNUNET_OK upon success; #GNUNET_SYSERR upon failure | ||
68 | */ | ||
69 | int | ||
70 | TALER_MINT_DB_create_tables (int temporary); | ||
71 | |||
72 | /** | ||
52 | * Setup prepared statements. FIXME: should this be part of the API, | 73 | * Setup prepared statements. FIXME: should this be part of the API, |
53 | * or just internal to "TALER_MINT_DB_get_connection()"? | 74 | * or just internal to "TALER_MINT_DB_get_connection()"? |
54 | * | 75 | * |