static struct GNUNET_FS_DirectoryBuilder * db
helper functions for Postgres DB interactions
void(* GNUNET_PQ_ReconnectCallback)(void *cls, struct GNUNET_PQ_Context *pq)
Function called each time we connect or reconnect to the database.
struct GNUNET_PQ_ResultSpec __attribute__
#define GNUNET_PQ_RECONNECT_CALLBACK_CLOSURE
GNUNET_GenericReturnValue
Named constants for return values.
void GNUNET_PQ_event_reconnect_(struct GNUNET_PQ_Context *db, int fd)
Internal API.
array_types
Internal types that are supported as array types.
void GNUNET_PQ_reconnect_(struct GNUNET_PQ_Context *db)
Reinitialize the database db.
Internal representation of the hash map.
Handle to Postgres database.
struct GNUNET_NETWORK_Handle * rfd
File descriptor wrapper for event_task.
bool prepared_check_patch
Did we prepare the gnunet_pq_check_patch statement?
GNUNET_PQ_ReconnectCallback rc
Function to call whenever we needed to reconnect conn.
enum GNUNET_GenericReturnValue versioning_ok
Set to GNUNET_OK if versioning schema is properly setup, GNUNET_NO if it is definitively not setup,...
struct GNUNET_SCHEDULER_Task * poller_task
Task responsible for polling events directly after having posted an event.
struct GNUNET_SCHEDULER_Task * event_task
Task responsible for processing events.
bool prepared_get_oid_by_name
Did we prepare the gnunet_pq_get_oid_by_name statement?
char * load_path
Path to load SQL files from.
struct GNUNET_TIME_Relative resubscribe_backoff
How fast should we resubscribe again?
struct GNUNET_CONTAINER_MultiShortmap * channel_map
Map managing event subscriptions.
struct GNUNET_PQ_Context::@42::name2oid * table
char * config_str
Configuration to use to connect to the DB.
PGconn * conn
Actual connection.
struct GNUNET_PQ_Context::@42 oids
Mapping between array types and Oid's, pre-filled at reconnect.
GNUNET_PQ_RECONNECT_CALLBACK_CLOSURE * rc_cls
Closure for rc.
Entry in list of pending tasks.
Time for relative time used by GNUnet, in microseconds.