aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_db_lib.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-06-11 01:23:16 +0200
committerChristian Grothoff <christian@grothoff.org>2017-06-11 01:33:02 +0200
commitc90ae1921559d990c179800ac392b0a5358758fb (patch)
treec696cf7e8a8d2f66d24eb221251ab0c05f7c948f /src/include/gnunet_db_lib.h
parentd71e2f3b35de7fcce36806bdad44ecf4114f6740 (diff)
downloadgnunet-c90ae1921559d990c179800ac392b0a5358758fb.tar.gz
gnunet-c90ae1921559d990c179800ac392b0a5358758fb.zip
rename GNUNET_PQ_QueryStatus to GNUNET_DB_QueryStatus
Diffstat (limited to 'src/include/gnunet_db_lib.h')
-rw-r--r--src/include/gnunet_db_lib.h54
1 files changed, 54 insertions, 0 deletions
diff --git a/src/include/gnunet_db_lib.h b/src/include/gnunet_db_lib.h
new file mode 100644
index 000000000..71ac4aae9
--- /dev/null
+++ b/src/include/gnunet_db_lib.h
@@ -0,0 +1,54 @@
1/*
2 This file is part of GNUnet
3 Copyright (C) 2017 GNUnet e.V.
4
5 GNUnet 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 GNUnet 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 GNUnet; see the file COPYING. If not, If not, see <http://www.gnu.org/licenses/>
15*/
16/**
17 * @file include/gnunet_db_lib.h
18 * @brief shared defintions for transactional databases
19 * @author Christian Grothoff
20 */
21#ifndef GNUNET_DB_LIB_H
22#define GNUNET_DB_LIB_H
23
24
25/**
26 * Status code returned from functions running database commands.
27 * Can be combined with a function that returns the number
28 * of results, so non-negative values indicate success.
29 */
30enum GNUNET_DB_QueryStatus
31{
32 /**
33 * A hard error occurred, retrying will not help.
34 */
35 GNUNET_DB_STATUS_HARD_ERROR = -2,
36
37 /**
38 * A soft error occurred, retrying the transaction may succeed.
39 */
40 GNUNET_DB_STATUS_SOFT_ERROR = -1,
41
42 /**
43 * The transaction succeeded, but yielded zero results.
44 */
45 GNUNET_DB_STATUS_SUCCESS_NO_RESULTS = 0,
46
47 /**
48 * The transaction succeeded, and yielded one result.
49 */
50 GNUNET_DB_STATUS_SUCCESS_ONE_RESULT = 1
51
52};
53
54#endif