25#ifndef GNUNET_PQ_LIB_H
26#define GNUNET_PQ_LIB_H
35#include "postgres_ext.h"
66 unsigned int param_length,
68 unsigned int scratch_length);
134#define GNUNET_PQ_query_param_end \
228 const bool *elements,
243 const uint16_t *elements,
258 const uint32_t *elements,
273 const uint64_t *elements,
289 const void *elements,
307 const void *elements[
static num],
324 const void *elements,
337#define GNUNET_PQ_query_param_array_auto_from_type(num, elements, db) \
338 GNUNET_PQ_query_param_array_bytes_same_size ((num), \
340 sizeof(*(elements)), \
356 const void *elements[
static num],
371#define GNUNET_PQ_query_param_array_ptrs_auto_from_type(num, elements, db) \
372 GNUNET_PQ_query_param_array_ptrs_bytes_same_size ((num), \
375 sizeof(*(elements[0])) \
391 const char *elements,
406 const char *elements[
static num],
417#define GNUNET_PQ_query_param_auto_from_type(x) \
418 GNUNET_PQ_query_param_fixed_size ((x), sizeof(*(x)))
759#define GNUNET_PQ_result_spec_end \
767 .result_size = NULL, \
768 .is_nullable = false, \
822#define GNUNET_PQ_result_spec_auto_from_type(name, dst) \
823 GNUNET_PQ_result_spec_fixed_size (name, (dst), sizeof(*(dst)))
1143#define GNUNET_PQ_result_spec_auto_array_from_type(db, name, num, dst) \
1144 GNUNET_PQ_result_spec_array_fixed_size ( \
1255 const char *statement_name,
1277 const char *statement_name,
1292 unsigned int num_results);
1312 const char *statement_name,
1336 const char *statement_name,
1366#define GNUNET_PQ_PREPARED_STATEMENT_END \
1438#define GNUNET_PQ_EXECUTE_STATEMENT_END \
1440 NULL, GNUNET_SYSERR \
1601 const char *section,
1602 const char *load_path_suffix,
1628 const char *section,
1629 const char *load_path_suffix,
1750 const char *load_suffix);
static struct GNUNET_CONFIGURATION_Handle * cfg
Our configuration.
static struct GNUNET_TIME_Relative timeout
User defined timestamp for completing operations.
static struct GNUNET_PEERSTORE_Handle * ps
Handle to the PEERSTORE service.
static char * data
The data to insert into the dht.
static char * name
Name (label) of the records to list.
static struct GNUNET_GNSRECORD_Data rd[50]
The record data under a single label.
static int result
Global testing status.
static struct GNUNET_CRYPTO_EddsaPublicKey pub
static struct GNUNET_FS_DirectoryBuilder * db
static struct GNUNET_SCHEDULER_Task * t
Main task.
commonly used definitions; globals in this file are exempt from the rule that the module name ("commo...
shared definitions for transactional databases
void(* GNUNET_DB_EventCallback)(void *cls, const void *extra, size_t extra_size)
Function called on events received from Postgres.
GNUNET_DB_QueryStatus
Status code returned from functions running database commands.
struct GNUNET_PQ_QueryParam GNUNET_PQ_query_param_fixed_size(const void *ptr, size_t ptr_size)
Generate query parameter for a buffer ptr of ptr_size bytes.
void(* GNUNET_PQ_PostgresResultHandler)(void *cls, PGresult *result, unsigned int num_results)
Function to be called with the results of a SELECT statement that has returned num_results results.
struct GNUNET_PQ_QueryParam GNUNET_PQ_query_param_array_ptrs_rel_time(unsigned int num, const struct GNUNET_TIME_Relative *elements[], struct GNUNET_PQ_Context *db)
Generate query parameter for an array of relative time stamps (pointers)
struct GNUNET_PQ_QueryParam GNUNET_PQ_query_param_uint64(const uint64_t *x)
Generate query parameter for an uint64_t in host byte order.
struct GNUNET_PQ_ResultSpec GNUNET_PQ_result_spec_timestamp_nbo(const char *name, struct GNUNET_TIME_TimestampNBO *tn)
Timestamp expected.
void GNUNET_PQ_reconnect(struct GNUNET_PQ_Context *db)
Reinitialize the database db.
enum GNUNET_DB_QueryStatus GNUNET_PQ_eval_prepared_multi_select(struct GNUNET_PQ_Context *db, const char *statement_name, const struct GNUNET_PQ_QueryParam *params, GNUNET_PQ_PostgresResultHandler rh, void *rh_cls)
Execute a named prepared statement that is a SELECT statement which may return multiple results in co...
struct GNUNET_PQ_ResultSpec GNUNET_PQ_result_spec_blind_sign_pub(const char *name, struct GNUNET_CRYPTO_BlindSignPublicKey **public_key)
Blind sign public key expected.
void GNUNET_PQ_event_do_poll(struct GNUNET_PQ_Context *db)
Poll for events right now.
struct GNUNET_PQ_ResultSpec GNUNET_PQ_result_spec_uint32(const char *name, uint32_t *u32)
uint32_t expected.
struct GNUNET_PQ_QueryParam GNUNET_PQ_query_param_array_abs_time(unsigned int num, const struct GNUNET_TIME_Absolute *elements, struct GNUNET_PQ_Context *db)
Generate query parameter for an array of absolute time stamps (continuous)
struct GNUNET_PQ_QueryParam GNUNET_PQ_query_param_null(void)
Generate query parameter to create a NULL value.
struct GNUNET_PQ_QueryParam GNUNET_PQ_query_param_array_ptrs_timestamp(unsigned int num, const struct GNUNET_TIME_Timestamp *elements[], struct GNUNET_PQ_Context *db)
Generate query parameter for an array of time stamps (pointers)
struct GNUNET_PQ_QueryParam GNUNET_PQ_query_param_blind_sign_pub(const struct GNUNET_CRYPTO_BlindSignPublicKey *pub)
Generate query parameter for a blind sign public key.
struct GNUNET_PQ_ResultSpec GNUNET_PQ_result_spec_array_variable_size(struct GNUNET_PQ_Context *db, const char *name, size_t *num, size_t **sizes, void **dst)
Array of variable-size result expected.
struct GNUNET_PQ_QueryParam GNUNET_PQ_query_param_array_ptrs_abs_time(unsigned int num, const struct GNUNET_TIME_Absolute *elements[], struct GNUNET_PQ_Context *db)
Generate query parameter for an array of absolute time stamps (pointers)
struct GNUNET_PQ_Context * GNUNET_PQ_connect_with_cfg(const struct GNUNET_CONFIGURATION_Handle *cfg, const char *section, const char *load_path_suffix, const struct GNUNET_PQ_ExecuteStatement *es, const struct GNUNET_PQ_PreparedStatement *ps)
Connect to a postgres database using the configuration option "CONFIG" in section.
struct GNUNET_PQ_QueryParam GNUNET_PQ_query_param_array_uint32(unsigned int num, const uint32_t *elements, struct GNUNET_PQ_Context *db)
Generate query parameter for an array of uint32_t in host byte order.
enum GNUNET_DB_QueryStatus GNUNET_PQ_eval_prepared_singleton_select(struct GNUNET_PQ_Context *db, const char *statement_name, const struct GNUNET_PQ_QueryParam *params, struct GNUNET_PQ_ResultSpec *rs)
Execute a named prepared statement that is a SELECT statement which must return a single result in co...
struct GNUNET_DB_EventHandler * GNUNET_PQ_event_listen(struct GNUNET_PQ_Context *db, const struct GNUNET_DB_EventHeaderP *es, struct GNUNET_TIME_Relative timeout, GNUNET_DB_EventCallback cb, void *cb_cls)
Register callback to be invoked on events of type es.
struct GNUNET_PQ_ResultSpec GNUNET_PQ_result_spec_array_fixed_size(struct GNUNET_PQ_Context *db, const char *name, size_t size, size_t *num, void **dst)
Array of fixed-size result expected.
void(* GNUNET_PQ_QueryConverter_Cleanup)(void *cls)
Function called to cleanup the closure of SQL parameters converter.
struct GNUNET_PQ_QueryParam GNUNET_PQ_query_param_unblinded_sig(const struct GNUNET_CRYPTO_UnblindedSignature *sig)
Generate query parameter for an unblinded signature of variable size.
void GNUNET_PQ_event_notify(struct GNUNET_PQ_Context *db, const struct GNUNET_DB_EventHeaderP *es, const void *extra, size_t extra_size)
Notify all that listen on es of an event.
struct GNUNET_PQ_ResultSpec GNUNET_PQ_result_spec_array_timestamp(struct GNUNET_PQ_Context *db, const char *name, size_t *num, struct GNUNET_TIME_Timestamp **dst)
array of relative time expected.
struct GNUNET_PQ_QueryParam GNUNET_PQ_query_param_array_ptrs_bytes(unsigned int num, const void *elements[static num], const size_t *sizes, struct GNUNET_PQ_Context *db)
Generate query parameter for an array of buffers elements, with sizes sizes.
struct GNUNET_PQ_Context * GNUNET_PQ_connect2(const char *config_str, const char *load_path, const char *auto_suffix, const struct GNUNET_PQ_ExecuteStatement *es, const struct GNUNET_PQ_PreparedStatement *ps, enum GNUNET_PQ_Options flags)
Create a connection to the Postgres database using config_str for the configuration.
char * GNUNET_PQ_get_event_notify_channel(const struct GNUNET_DB_EventHeaderP *es)
Compute the channel that one should notify upon for the given event specification.
void GNUNET_PQ_cleanup_query_params_closures(const struct GNUNET_PQ_QueryParam *params)
Must be called to cleanup memory from closures after the query parameters have been used as much as n...
struct GNUNET_PQ_ExecuteStatement GNUNET_PQ_make_execute(const char *sql)
Create a struct GNUNET_PQ_ExecuteStatement where errors are fatal.
struct GNUNET_PQ_QueryParam GNUNET_PQ_query_param_absolute_time(const struct GNUNET_TIME_Absolute *x)
Generate query parameter for an absolute time value.
enum GNUNET_GenericReturnValue GNUNET_PQ_prepare_once(struct GNUNET_PQ_Context *db, const struct GNUNET_PQ_PreparedStatement *ps)
Request creation of prepared statements ps from Postgres, but do not automatically re-prepare the sta...
struct GNUNET_PQ_QueryParam GNUNET_PQ_query_param_relative_time(const struct GNUNET_TIME_Relative *x)
Generate query parameter for a relative time value.
struct GNUNET_PQ_QueryParam GNUNET_PQ_query_param_array_uint64(unsigned int num, const uint64_t *elements, struct GNUNET_PQ_Context *db)
Generate query parameter for an array of uint64 in host byte order.
struct GNUNET_PQ_QueryParam GNUNET_PQ_query_param_int64(const int64_t *x)
Generate query parameter for an int64_t in host byte order.
struct GNUNET_PQ_QueryParam GNUNET_PQ_query_param_uint16(const uint16_t *x)
Generate query parameter for an uint16_t in host byte order.
struct GNUNET_PQ_ResultSpec GNUNET_PQ_result_spec_fixed_size(const char *name, void *dst, size_t dst_size)
Fixed-size result expected.
struct GNUNET_PQ_ResultSpec GNUNET_PQ_result_spec_array_bool(struct GNUNET_PQ_Context *db, const char *name, size_t *num, bool **bools)
array of bool expected.
struct GNUNET_PQ_QueryParam GNUNET_PQ_query_param_rsa_public_key(const struct GNUNET_CRYPTO_RsaPublicKey *x)
Generate query parameter for an RSA public key.
struct GNUNET_PQ_ResultSpec GNUNET_PQ_result_spec_bool(const char *name, bool *dst)
boolean expected.
void(* GNUNET_PQ_ResultCleanup)(void *cls, void *rd)
Function called to clean up memory allocated by a GNUNET_PQ_ResultConverter.
enum GNUNET_GenericReturnValue GNUNET_PQ_exec_statements(struct GNUNET_PQ_Context *db, const struct GNUNET_PQ_ExecuteStatement *es)
Request execution of an array of statements es from Postgres.
struct GNUNET_PQ_ResultSpec GNUNET_PQ_result_spec_absolute_time_nbo(const char *name, struct GNUNET_TIME_AbsoluteNBO *at)
Absolute time expected.
enum GNUNET_GenericReturnValue GNUNET_PQ_prepare_statements(struct GNUNET_PQ_Context *db, const struct GNUNET_PQ_PreparedStatement *ps)
Request creation of prepared statements ps from Postgres.
struct GNUNET_PQ_QueryParam GNUNET_PQ_query_param_array_bool(unsigned int num, const bool *elements, struct GNUNET_PQ_Context *db)
Generate query parameter for an array of bool in host byte order.
int(* GNUNET_PQ_QueryConverter)(void *cls, const void *data, size_t data_len, void *param_values[], int param_lengths[], int param_formats[], unsigned int param_length, void *scratch[], unsigned int scratch_length)
Function called to convert input argument into SQL parameters.
struct GNUNET_PQ_QueryParam GNUNET_PQ_query_param_absolute_time_nbo(const struct GNUNET_TIME_AbsoluteNBO *x)
Generate query parameter for an absolute time value.
struct GNUNET_PQ_QueryParam GNUNET_PQ_query_param_array_ptrs_string(unsigned int num, const char *elements[static num], struct GNUNET_PQ_Context *db)
Generate query parameter for an array of strings (pointers)
struct GNUNET_PQ_ResultSpec GNUNET_PQ_result_spec_uint64(const char *name, uint64_t *u64)
uint64_t expected.
struct GNUNET_PQ_QueryParam GNUNET_PQ_query_param_array_bytes(unsigned int num, const void *elements, const size_t *sizes, struct GNUNET_PQ_Context *db)
Generate query parameter for an array of buffers elements, each of corresponding size given in sizes.
struct GNUNET_PQ_QueryParam GNUNET_PQ_query_param_bool(bool b)
Pass a boolean into a query.
struct GNUNET_PQ_ResultSpec GNUNET_PQ_result_spec_string(const char *name, char **dst)
0-terminated string expected.
void GNUNET_PQ_reconnect_if_down(struct GNUNET_PQ_Context *db)
Reinitialize the database db if the connection is down.
enum GNUNET_DB_QueryStatus GNUNET_PQ_eval_result(struct GNUNET_PQ_Context *db, const char *statement_name, PGresult *result)
Check the result's error code to see what happened.
void GNUNET_PQ_disconnect(struct GNUNET_PQ_Context *db)
Disconnect from the database, destroying the prepared statements and releasing other associated resou...
enum GNUNET_GenericReturnValue(* GNUNET_PQ_ResultConverter)(void *cls, PGresult *result, int row, const char *fname, size_t *dst_size, void *dst)
Extract data from a Postgres database result at row row.
struct GNUNET_PQ_ResultSpec GNUNET_PQ_result_spec_allow_null(struct GNUNET_PQ_ResultSpec rs, bool *is_null)
Allow NULL value to be found in the database for the given value.
struct GNUNET_PQ_ResultSpec GNUNET_PQ_result_spec_array_uint16(struct GNUNET_PQ_Context *db, const char *name, size_t *num, uint16_t **dst)
array of uint16_t expected.
struct GNUNET_PQ_QueryParam GNUNET_PQ_query_param_blind_sign_priv(const struct GNUNET_CRYPTO_BlindSignPrivateKey *priv)
Generate query parameter for a blind sign private key of variable size.
struct GNUNET_PQ_ResultSpec GNUNET_PQ_result_spec_absolute_time(const char *name, struct GNUNET_TIME_Absolute *at)
Absolute time expected.
struct GNUNET_PQ_ResultSpec GNUNET_PQ_result_spec_int64(const char *name, int64_t *i64)
int64_t expected.
struct GNUNET_PQ_QueryParam GNUNET_PQ_query_param_blinded_sig(const struct GNUNET_CRYPTO_BlindedSignature *b_sig)
Generate query parameter for a blinded signature of variable size.
struct GNUNET_PQ_ResultSpec GNUNET_PQ_result_spec_uint16(const char *name, uint16_t *u16)
uint16_t expected.
struct GNUNET_PQ_ResultSpec GNUNET_PQ_result_spec_array_string(struct GNUNET_PQ_Context *db, const char *name, size_t *num, char **dst)
Array of 0-terminated strings expected.
struct GNUNET_PQ_QueryParam GNUNET_PQ_query_param_array_timestamp(unsigned int num, const struct GNUNET_TIME_Timestamp *elements, struct GNUNET_PQ_Context *db)
Generate query parameter for an array of time stamps (continuous)
struct GNUNET_PQ_QueryParam GNUNET_PQ_query_param_array_rel_time(unsigned int num, const struct GNUNET_TIME_Relative *elements, struct GNUNET_PQ_Context *db)
Generate query parameter for an array of relative time stamps (continuous)
struct GNUNET_PQ_QueryParam GNUNET_PQ_query_param_array_uint16(unsigned int num, const uint16_t *elements, struct GNUNET_PQ_Context *db)
Generate query parameter for an array of uint16_t in host byte order.
struct GNUNET_PQ_PreparedStatement GNUNET_PQ_make_prepare(const char *name, const char *sql)
Create a struct GNUNET_PQ_PreparedStatement.
struct GNUNET_PQ_ExecuteStatement GNUNET_PQ_make_try_execute(const char *sql)
Create a struct GNUNET_PQ_ExecuteStatement where errors should be tolerated.
struct GNUNET_PQ_QueryParam GNUNET_PQ_query_param_uint32(const uint32_t *x)
Generate query parameter for an uint32_t in host byte order.
PGresult * GNUNET_PQ_exec_prepared(struct GNUNET_PQ_Context *db, const char *name, const struct GNUNET_PQ_QueryParam *params)
Execute a prepared statement.
struct GNUNET_PQ_ResultSpec GNUNET_PQ_result_spec_relative_time(const char *name, struct GNUNET_TIME_Relative *rt)
Relative time expected.
struct GNUNET_PQ_QueryParam GNUNET_PQ_query_param_timestamp(const struct GNUNET_TIME_Timestamp *x)
Generate query parameter for a timestamp.
GNUNET_PQ_Options
Flags to control PQ operation.
@ GNUNET_PQ_FLAG_DROP
Dropping database.
@ GNUNET_PQ_FLAG_CHECK_CURRENT
Check database version is current.
@ GNUNET_PQ_FLAG_NONE
Traditional default.
struct GNUNET_PQ_Context * GNUNET_PQ_connect_with_cfg2(const struct GNUNET_CONFIGURATION_Handle *cfg, const char *section, const char *load_path_suffix, const struct GNUNET_PQ_ExecuteStatement *es, const struct GNUNET_PQ_PreparedStatement *ps, enum GNUNET_PQ_Options flags)
Connect to a postgres database using the configuration option "CONFIG" in section.
struct GNUNET_PQ_ResultSpec GNUNET_PQ_result_spec_variable_size(const char *name, void **dst, size_t *sptr)
Variable-size result expected.
struct GNUNET_PQ_ResultSpec GNUNET_PQ_result_spec_rsa_public_key(const char *name, struct GNUNET_CRYPTO_RsaPublicKey **rsa)
RSA public key expected.
void GNUNET_PQ_cleanup_result(struct GNUNET_PQ_ResultSpec *rs)
Free all memory that was allocated in rs during GNUNET_PQ_extract_result().
struct GNUNET_PQ_QueryParam GNUNET_PQ_query_param_timestamp_nbo(const struct GNUNET_TIME_TimestampNBO *x)
Generate query parameter for a timestamp in NBO.
struct GNUNET_PQ_ResultSpec GNUNET_PQ_result_spec_array_uint64(struct GNUNET_PQ_Context *db, const char *name, size_t *num, uint64_t **dst)
array of uint64_t expected.
enum GNUNET_GenericReturnValue GNUNET_PQ_extract_result(PGresult *result, struct GNUNET_PQ_ResultSpec *rs, int row)
Extract results from a query result according to the given specification.
struct GNUNET_PQ_ResultSpec GNUNET_PQ_result_spec_array_abs_time(struct GNUNET_PQ_Context *db, const char *name, size_t *num, struct GNUNET_TIME_Absolute **dst)
array of absolute time expected.
enum GNUNET_DB_QueryStatus GNUNET_PQ_eval_prepared_non_select(struct GNUNET_PQ_Context *db, const char *statement_name, const struct GNUNET_PQ_QueryParam *params)
Execute a named prepared statement that is NOT a SELECT statement in connection using the given param...
void GNUNET_PQ_event_listen_cancel(struct GNUNET_DB_EventHandler *eh)
Stop notifications.
struct GNUNET_PQ_ResultSpec GNUNET_PQ_result_spec_array_rel_time(struct GNUNET_PQ_Context *db, const char *name, size_t *num, struct GNUNET_TIME_Relative **dst)
array of relative time expected.
struct GNUNET_PQ_ResultSpec GNUNET_PQ_result_spec_rsa_signature(const char *name, struct GNUNET_CRYPTO_RsaSignature **sig)
RSA signature expected.
struct GNUNET_PQ_ResultSpec __attribute__
struct GNUNET_PQ_QueryParam GNUNET_PQ_query_param_array_ptrs_bytes_same_size(unsigned int num, const void *elements[static num], size_t same_size, struct GNUNET_PQ_Context *db)
Generate query parameter for an array of pointers to buffers elements, each of the same size size.
struct GNUNET_PQ_ResultSpec GNUNET_PQ_result_spec_array_uint32(struct GNUNET_PQ_Context *db, const char *name, size_t *num, uint32_t **dst)
array of uint32_t expected.
struct GNUNET_PQ_QueryParam GNUNET_PQ_query_param_array_string(unsigned int num, const char *elements, struct GNUNET_PQ_Context *db)
Generate query parameter for an array of strings (continuous)
struct GNUNET_PQ_ResultSpec GNUNET_PQ_result_spec_blind_sign_priv(const char *name, struct GNUNET_CRYPTO_BlindSignPrivateKey **private_key)
Blind sign private key expected.
struct GNUNET_PQ_QueryParam GNUNET_PQ_query_param_string(const char *ptr)
Generate query parameter for a string.
struct GNUNET_PQ_ResultSpec GNUNET_PQ_result_spec_timestamp(const char *name, struct GNUNET_TIME_Timestamp *t)
Timestamp expected.
struct GNUNET_PQ_QueryParam GNUNET_PQ_query_param_array_bytes_same_size(unsigned int num, const void *elements, size_t same_size, struct GNUNET_PQ_Context *db)
Generate query parameter for an array of buffers elements, each of the same size size.
enum GNUNET_GenericReturnValue GNUNET_PQ_get_oid_by_name(struct GNUNET_PQ_Context *db, const char *name, Oid *oid)
Returns the oid for a given datatype by name.
struct GNUNET_PQ_QueryParam GNUNET_PQ_query_param_rsa_signature(const struct GNUNET_CRYPTO_RsaSignature *x)
Generate query parameter for an RSA signature.
enum GNUNET_GenericReturnValue GNUNET_PQ_exec_sql(struct GNUNET_PQ_Context *db, const char *buf)
Execute SQL statements from buf against db.
struct GNUNET_PQ_Context * GNUNET_PQ_connect(const char *config_str, const char *load_path, const struct GNUNET_PQ_ExecuteStatement *es, const struct GNUNET_PQ_PreparedStatement *ps)
Create a connection to the Postgres database using config_str for the configuration.
enum GNUNET_GenericReturnValue GNUNET_PQ_run_sql(struct GNUNET_PQ_Context *db, const char *load_suffix)
Within the db context, run all the SQL files in the load path where the name starts with the load_suf...
Functions related to time.
GNUNET_GenericReturnValue
Named constants for return values.
static unsigned int size
Size of the "table".
Type of private signing keys for blind signing.
Type of public signing keys for blind signatures.
Type for blinded signatures.
The public information of an RSA key pair.
Type of (unblinded) signatures.
Handle for an active LISTENer to the database.
void * cb_cls
Closure for cb.
GNUNET_DB_EventCallback cb
Function to call on events.
Handle to Postgres database.
struct GNUNET_PQ_ExecuteStatement * es
Statements to execute upon connection.
enum GNUNET_PQ_Options flags
Flags controlling the connection.
char * load_path
Path to load SQL files from.
char * config_str
Configuration to use to connect to the DB.
char * auto_suffix
Suffix to append to path to load on startup.
Information needed to run a list of SQL statements using GNUNET_PQ_exec_statements().
const char * sql
Actual SQL statement.
int ignore_errors
Should we ignore errors?
Information needed to prepare a list of SQL statements using GNUNET_PQ_prepare_statements().
const char * name
Name of the statement.
const char * sql
Actual SQL statement.
Description of a DB query parameter.
void * conv_cls
Closure for conv.
const void * data
Data or NULL.
GNUNET_PQ_QueryConverter conv
Function for how to handle this type of entry.
unsigned int num_params
Number of parameters eaten by this operation.
GNUNET_PQ_QueryConverter_Cleanup conv_cls_cleanup
Function to cleanup the closure conv_cls, may be NULL.
Description of a DB result cell.
const char * fname
Field name of the desired result.
bool * is_null
Points to a location where we should store "true" if the result found is NULL, and otherwise "false".
void * dst
Destination for the data.
bool is_nullable
True if NULL is allowed for a value in the database.
void * cls
Closure for conv and cleaner.
GNUNET_PQ_ResultConverter conv
What is the format of the result?
size_t * result_size
Where to store actual size of the result.
GNUNET_PQ_ResultCleanup cleaner
Function to clean up result data, NULL if cleanup is not necessary.
size_t dst_size
Allowed size for the data, 0 for variable-size (in this case, the type of dst is a void ** and we nee...
Time for absolute time used by GNUnet, in microseconds and in network byte order.
Time for absolute times used by GNUnet, in microseconds.
Time for relative time used by GNUnet, in microseconds.
Time for timestamps used by GNUnet, in seconds and in network byte order.
Time for timestamps used by GNUnet, in microseconds rounded to seconds.