GNUnet  0.11.x
Enumerations
gnunet_db_lib.h File Reference

shared defintions for transactional databases More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  GNUNET_DB_QueryStatus { GNUNET_DB_STATUS_HARD_ERROR = -2, GNUNET_DB_STATUS_SOFT_ERROR = -1, GNUNET_DB_STATUS_SUCCESS_NO_RESULTS = 0, GNUNET_DB_STATUS_SUCCESS_ONE_RESULT = 1 }
 Status code returned from functions running database commands. More...
 

Detailed Description

shared defintions for transactional databases

Author
Christian Grothoff

Definition in file gnunet_db_lib.h.

Enumeration Type Documentation

◆ GNUNET_DB_QueryStatus

Status code returned from functions running database commands.

Can be combined with a function that returns the number of results, so all non-negative values indicate success.

Enumerator
GNUNET_DB_STATUS_HARD_ERROR 

A hard error occurred, retrying will not help.

GNUNET_DB_STATUS_SOFT_ERROR 

A soft error occurred, retrying the transaction may succeed.

Includes DEADLOCKS and SERIALIZATION errors.

GNUNET_DB_STATUS_SUCCESS_NO_RESULTS 

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_ONE_RESULT 

The transaction succeeded, and yielded one result.

Definition at line 34 of file gnunet_db_lib.h.

35 {
40 
46 
54 
59 
60  /* Larger values may be returned for SELECT statements
61  that returned more than one result. */
62 };
A soft error occurred, retrying the transaction may succeed.
Definition: gnunet_db_lib.h:45
A hard error occurred, retrying will not help.
Definition: gnunet_db_lib.h:39
The transaction succeeded, and yielded one result.
Definition: gnunet_db_lib.h:58
The transaction succeeded, but yielded zero results.
Definition: gnunet_db_lib.h:53