From: Christian Grothoff Date: Sun, 11 Jun 2017 00:11:52 +0000 (+0200) Subject: clarify enum values X-Git-Tag: gnunet-0.11.0rc0~238 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=9e1e0255ccf57f2ee0a2be9f4d49ee6308bdd738;p=oweals%2Fgnunet.git clarify enum values --- 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