From 9e1e0255ccf57f2ee0a2be9f4d49ee6308bdd738 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 11 Jun 2017 02:11:52 +0200 Subject: clarify enum values --- src/include/gnunet_db_lib.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/include/gnunet_db_lib.h') diff --git a/src/include/gnunet_db_lib.h b/src/include/gnunet_db_lib.h index 71ac4aae9..9356f66cb 100644 --- a/src/include/gnunet_db_lib.h +++ b/src/include/gnunet_db_lib.h @@ -25,7 +25,7 @@ /** * Status code returned from functions running database commands. * Can be combined with a function that returns the number - * of results, so non-negative values indicate success. + * of results, so all non-negative values indicate success. */ enum GNUNET_DB_QueryStatus { @@ -36,11 +36,15 @@ enum GNUNET_DB_QueryStatus /** * A soft error occurred, retrying the transaction may succeed. + * Includes DEADLOCKS and SERIALIZATION errors. */ GNUNET_DB_STATUS_SOFT_ERROR = -1, /** * The transaction succeeded, but yielded zero results. + * May include the case where an INSERT failed with UNIQUE + * violation (i.e. row already exists) or where DELETE + * failed to remove anything (i.e. nothing matched). */ GNUNET_DB_STATUS_SUCCESS_NO_RESULTS = 0, @@ -49,6 +53,9 @@ enum GNUNET_DB_QueryStatus */ GNUNET_DB_STATUS_SUCCESS_ONE_RESULT = 1 + /* Larger values may be returned for SELECT statements + that returned more than one result. */ + }; #endif -- cgit v1.2.3