diff options
author | Christian Grothoff <christian@grothoff.org> | 2021-06-16 17:09:22 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2021-06-16 17:09:22 +0200 |
commit | 1bc1fbda00a9e31d2256c52b29a2c758b7818268 (patch) | |
tree | 6480c3ed89990f845c44d51b14dc8d67fc3a79bb /src/include/gnunet_pq_lib.h | |
parent | c66e726a8abe565e5f34313e38729f18fde4a73a (diff) | |
download | gnunet-1bc1fbda00a9e31d2256c52b29a2c758b7818268.tar.gz gnunet-1bc1fbda00a9e31d2256c52b29a2c758b7818268.zip |
PQ: update libgnunetpq implementation to avoid duplicated nullable tests and to allow for the actual field name to differ from the fname, as done for example by the Taler amounts which are split over two DB fields
Diffstat (limited to 'src/include/gnunet_pq_lib.h')
-rw-r--r-- | src/include/gnunet_pq_lib.h | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/include/gnunet_pq_lib.h b/src/include/gnunet_pq_lib.h index c8a648032..d7fa793ca 100644 --- a/src/include/gnunet_pq_lib.h +++ b/src/include/gnunet_pq_lib.h | |||
@@ -245,15 +245,16 @@ GNUNET_PQ_query_param_uint64 (const uint64_t *x); | |||
245 | * @param[out] dst where to store the result | 245 | * @param[out] dst where to store the result |
246 | * @return | 246 | * @return |
247 | * #GNUNET_YES if all results could be extracted | 247 | * #GNUNET_YES if all results could be extracted |
248 | * #GNUNET_SYSERR if a result was invalid (non-existing field or NULL) | 248 | * #GNUNET_NO if the field was NULL |
249 | * #GNUNET_SYSERR if a result was invalid (non-existing field) | ||
249 | */ | 250 | */ |
250 | typedef int | 251 | typedef enum GNUNET_GenericReturnValue |
251 | (*GNUNET_PQ_ResultConverter) (void *cls, | 252 | (*GNUNET_PQ_ResultConverter)(void *cls, |
252 | PGresult *result, | 253 | PGresult *result, |
253 | int row, | 254 | int row, |
254 | const char *fname, | 255 | const char *fname, |
255 | size_t *dst_size, | 256 | size_t *dst_size, |
256 | void *dst); | 257 | void *dst); |
257 | 258 | ||
258 | 259 | ||
259 | /** | 260 | /** |
@@ -310,7 +311,7 @@ struct GNUNET_PQ_ResultSpec | |||
310 | * Where to store actual size of the result. | 311 | * Where to store actual size of the result. |
311 | */ | 312 | */ |
312 | size_t *result_size; | 313 | size_t *result_size; |
313 | 314 | ||
314 | /** | 315 | /** |
315 | * True if NULL is allowed for a value in the database. | 316 | * True if NULL is allowed for a value in the database. |
316 | */ | 317 | */ |