diff options
Diffstat (limited to 'src/include/gnunet_pq_lib.h')
-rw-r--r-- | src/include/gnunet_pq_lib.h | 128 |
1 files changed, 66 insertions, 62 deletions
diff --git a/src/include/gnunet_pq_lib.h b/src/include/gnunet_pq_lib.h index fcd886521..6c576c8ab 100644 --- a/src/include/gnunet_pq_lib.h +++ b/src/include/gnunet_pq_lib.h | |||
@@ -60,7 +60,8 @@ typedef int (*GNUNET_PQ_QueryConverter) (void *cls, | |||
60 | /** | 60 | /** |
61 | * @brief Description of a DB query parameter. | 61 | * @brief Description of a DB query parameter. |
62 | */ | 62 | */ |
63 | struct GNUNET_PQ_QueryParam { | 63 | struct GNUNET_PQ_QueryParam |
64 | { | ||
64 | /** | 65 | /** |
65 | * Function for how to handle this type of entry. | 66 | * Function for how to handle this type of entry. |
66 | */ | 67 | */ |
@@ -105,7 +106,7 @@ struct GNUNET_PQ_QueryParam { | |||
105 | * @oaran ptr_size number of bytes in @a ptr | 106 | * @oaran ptr_size number of bytes in @a ptr |
106 | */ | 107 | */ |
107 | struct GNUNET_PQ_QueryParam | 108 | struct GNUNET_PQ_QueryParam |
108 | GNUNET_PQ_query_param_fixed_size(const void *ptr, size_t ptr_size); | 109 | GNUNET_PQ_query_param_fixed_size (const void *ptr, size_t ptr_size); |
109 | 110 | ||
110 | 111 | ||
111 | /** | 112 | /** |
@@ -114,7 +115,7 @@ GNUNET_PQ_query_param_fixed_size(const void *ptr, size_t ptr_size); | |||
114 | * @param ptr pointer to the string query parameter to pass | 115 | * @param ptr pointer to the string query parameter to pass |
115 | */ | 116 | */ |
116 | struct GNUNET_PQ_QueryParam | 117 | struct GNUNET_PQ_QueryParam |
117 | GNUNET_PQ_query_param_string(const char *ptr); | 118 | GNUNET_PQ_query_param_string (const char *ptr); |
118 | 119 | ||
119 | 120 | ||
120 | /** | 121 | /** |
@@ -124,7 +125,7 @@ GNUNET_PQ_query_param_string(const char *ptr); | |||
124 | * @param x pointer to the query parameter to pass. | 125 | * @param x pointer to the query parameter to pass. |
125 | */ | 126 | */ |
126 | #define GNUNET_PQ_query_param_auto_from_type(x) \ | 127 | #define GNUNET_PQ_query_param_auto_from_type(x) \ |
127 | GNUNET_PQ_query_param_fixed_size((x), sizeof(*(x))) | 128 | GNUNET_PQ_query_param_fixed_size ((x), sizeof(*(x))) |
128 | 129 | ||
129 | 130 | ||
130 | /** | 131 | /** |
@@ -134,7 +135,7 @@ GNUNET_PQ_query_param_string(const char *ptr); | |||
134 | * @param x the query parameter to pass. | 135 | * @param x the query parameter to pass. |
135 | */ | 136 | */ |
136 | struct GNUNET_PQ_QueryParam | 137 | struct GNUNET_PQ_QueryParam |
137 | GNUNET_PQ_query_param_rsa_public_key( | 138 | GNUNET_PQ_query_param_rsa_public_key ( |
138 | const struct GNUNET_CRYPTO_RsaPublicKey *x); | 139 | const struct GNUNET_CRYPTO_RsaPublicKey *x); |
139 | 140 | ||
140 | 141 | ||
@@ -145,7 +146,7 @@ GNUNET_PQ_query_param_rsa_public_key( | |||
145 | * @param x the query parameter to pass | 146 | * @param x the query parameter to pass |
146 | */ | 147 | */ |
147 | struct GNUNET_PQ_QueryParam | 148 | struct GNUNET_PQ_QueryParam |
148 | GNUNET_PQ_query_param_rsa_signature( | 149 | GNUNET_PQ_query_param_rsa_signature ( |
149 | const struct GNUNET_CRYPTO_RsaSignature *x); | 150 | const struct GNUNET_CRYPTO_RsaSignature *x); |
150 | 151 | ||
151 | 152 | ||
@@ -156,7 +157,7 @@ GNUNET_PQ_query_param_rsa_signature( | |||
156 | * @param x pointer to the query parameter to pass | 157 | * @param x pointer to the query parameter to pass |
157 | */ | 158 | */ |
158 | struct GNUNET_PQ_QueryParam | 159 | struct GNUNET_PQ_QueryParam |
159 | GNUNET_PQ_query_param_absolute_time(const struct GNUNET_TIME_Absolute *x); | 160 | GNUNET_PQ_query_param_absolute_time (const struct GNUNET_TIME_Absolute *x); |
160 | 161 | ||
161 | 162 | ||
162 | /** | 163 | /** |
@@ -166,7 +167,7 @@ GNUNET_PQ_query_param_absolute_time(const struct GNUNET_TIME_Absolute *x); | |||
166 | * @param x pointer to the query parameter to pass | 167 | * @param x pointer to the query parameter to pass |
167 | */ | 168 | */ |
168 | struct GNUNET_PQ_QueryParam | 169 | struct GNUNET_PQ_QueryParam |
169 | GNUNET_PQ_query_param_absolute_time_nbo( | 170 | GNUNET_PQ_query_param_absolute_time_nbo ( |
170 | const struct GNUNET_TIME_AbsoluteNBO *x); | 171 | const struct GNUNET_TIME_AbsoluteNBO *x); |
171 | 172 | ||
172 | 173 | ||
@@ -176,7 +177,7 @@ GNUNET_PQ_query_param_absolute_time_nbo( | |||
176 | * @param x pointer to the query parameter to pass | 177 | * @param x pointer to the query parameter to pass |
177 | */ | 178 | */ |
178 | struct GNUNET_PQ_QueryParam | 179 | struct GNUNET_PQ_QueryParam |
179 | GNUNET_PQ_query_param_uint16(const uint16_t *x); | 180 | GNUNET_PQ_query_param_uint16 (const uint16_t *x); |
180 | 181 | ||
181 | 182 | ||
182 | /** | 183 | /** |
@@ -185,7 +186,7 @@ GNUNET_PQ_query_param_uint16(const uint16_t *x); | |||
185 | * @param x pointer to the query parameter to pass | 186 | * @param x pointer to the query parameter to pass |
186 | */ | 187 | */ |
187 | struct GNUNET_PQ_QueryParam | 188 | struct GNUNET_PQ_QueryParam |
188 | GNUNET_PQ_query_param_uint32(const uint32_t *x); | 189 | GNUNET_PQ_query_param_uint32 (const uint32_t *x); |
189 | 190 | ||
190 | 191 | ||
191 | /** | 192 | /** |
@@ -194,7 +195,7 @@ GNUNET_PQ_query_param_uint32(const uint32_t *x); | |||
194 | * @param x pointer to the query parameter to pass | 195 | * @param x pointer to the query parameter to pass |
195 | */ | 196 | */ |
196 | struct GNUNET_PQ_QueryParam | 197 | struct GNUNET_PQ_QueryParam |
197 | GNUNET_PQ_query_param_uint64(const uint64_t *x); | 198 | GNUNET_PQ_query_param_uint64 (const uint64_t *x); |
198 | 199 | ||
199 | 200 | ||
200 | /* ************************* pq_result_helper.c functions ************************ */ | 201 | /* ************************* pq_result_helper.c functions ************************ */ |
@@ -234,7 +235,8 @@ typedef void (*GNUNET_PQ_ResultCleanup) (void *cls, void *rd); | |||
234 | /** | 235 | /** |
235 | * @brief Description of a DB result cell. | 236 | * @brief Description of a DB result cell. |
236 | */ | 237 | */ |
237 | struct GNUNET_PQ_ResultSpec { | 238 | struct GNUNET_PQ_ResultSpec |
239 | { | ||
238 | /** | 240 | /** |
239 | * What is the format of the result? | 241 | * What is the format of the result? |
240 | */ | 242 | */ |
@@ -295,9 +297,9 @@ struct GNUNET_PQ_ResultSpec { | |||
295 | * @return array entry for the result specification to use | 297 | * @return array entry for the result specification to use |
296 | */ | 298 | */ |
297 | struct GNUNET_PQ_ResultSpec | 299 | struct GNUNET_PQ_ResultSpec |
298 | GNUNET_PQ_result_spec_variable_size(const char *name, | 300 | GNUNET_PQ_result_spec_variable_size (const char *name, |
299 | void **dst, | 301 | void **dst, |
300 | size_t *sptr); | 302 | size_t *sptr); |
301 | 303 | ||
302 | 304 | ||
303 | /** | 305 | /** |
@@ -309,7 +311,7 @@ GNUNET_PQ_result_spec_variable_size(const char *name, | |||
309 | * @return array entry for the result specification to use | 311 | * @return array entry for the result specification to use |
310 | */ | 312 | */ |
311 | struct GNUNET_PQ_ResultSpec | 313 | struct GNUNET_PQ_ResultSpec |
312 | GNUNET_PQ_result_spec_fixed_size(const char *name, void *dst, size_t dst_size); | 314 | GNUNET_PQ_result_spec_fixed_size (const char *name, void *dst, size_t dst_size); |
313 | 315 | ||
314 | 316 | ||
315 | /** | 317 | /** |
@@ -320,7 +322,7 @@ GNUNET_PQ_result_spec_fixed_size(const char *name, void *dst, size_t dst_size); | |||
320 | * @return array entry for the result specification to use | 322 | * @return array entry for the result specification to use |
321 | */ | 323 | */ |
322 | #define GNUNET_PQ_result_spec_auto_from_type(name, dst) \ | 324 | #define GNUNET_PQ_result_spec_auto_from_type(name, dst) \ |
323 | GNUNET_PQ_result_spec_fixed_size(name, (dst), sizeof(*(dst))) | 325 | GNUNET_PQ_result_spec_fixed_size (name, (dst), sizeof(*(dst))) |
324 | 326 | ||
325 | 327 | ||
326 | /** | 328 | /** |
@@ -331,7 +333,7 @@ GNUNET_PQ_result_spec_fixed_size(const char *name, void *dst, size_t dst_size); | |||
331 | * @return array entry for the result specification to use | 333 | * @return array entry for the result specification to use |
332 | */ | 334 | */ |
333 | struct GNUNET_PQ_ResultSpec | 335 | struct GNUNET_PQ_ResultSpec |
334 | GNUNET_PQ_result_spec_string(const char *name, char **dst); | 336 | GNUNET_PQ_result_spec_string (const char *name, char **dst); |
335 | 337 | ||
336 | 338 | ||
337 | /** | 339 | /** |
@@ -342,8 +344,8 @@ GNUNET_PQ_result_spec_string(const char *name, char **dst); | |||
342 | * @return array entry for the result specification to use | 344 | * @return array entry for the result specification to use |
343 | */ | 345 | */ |
344 | struct GNUNET_PQ_ResultSpec | 346 | struct GNUNET_PQ_ResultSpec |
345 | GNUNET_PQ_result_spec_rsa_public_key(const char *name, | 347 | GNUNET_PQ_result_spec_rsa_public_key (const char *name, |
346 | struct GNUNET_CRYPTO_RsaPublicKey **rsa); | 348 | struct GNUNET_CRYPTO_RsaPublicKey **rsa); |
347 | 349 | ||
348 | 350 | ||
349 | /** | 351 | /** |
@@ -354,8 +356,8 @@ GNUNET_PQ_result_spec_rsa_public_key(const char *name, | |||
354 | * @return array entry for the result specification to use | 356 | * @return array entry for the result specification to use |
355 | */ | 357 | */ |
356 | struct GNUNET_PQ_ResultSpec | 358 | struct GNUNET_PQ_ResultSpec |
357 | GNUNET_PQ_result_spec_rsa_signature(const char *name, | 359 | GNUNET_PQ_result_spec_rsa_signature (const char *name, |
358 | struct GNUNET_CRYPTO_RsaSignature **sig); | 360 | struct GNUNET_CRYPTO_RsaSignature **sig); |
359 | 361 | ||
360 | 362 | ||
361 | /** | 363 | /** |
@@ -366,8 +368,8 @@ GNUNET_PQ_result_spec_rsa_signature(const char *name, | |||
366 | * @return array entry for the result specification to use | 368 | * @return array entry for the result specification to use |
367 | */ | 369 | */ |
368 | struct GNUNET_PQ_ResultSpec | 370 | struct GNUNET_PQ_ResultSpec |
369 | GNUNET_PQ_result_spec_absolute_time(const char *name, | 371 | GNUNET_PQ_result_spec_absolute_time (const char *name, |
370 | struct GNUNET_TIME_Absolute *at); | 372 | struct GNUNET_TIME_Absolute *at); |
371 | 373 | ||
372 | 374 | ||
373 | /** | 375 | /** |
@@ -378,8 +380,8 @@ GNUNET_PQ_result_spec_absolute_time(const char *name, | |||
378 | * @return array entry for the result specification to use | 380 | * @return array entry for the result specification to use |
379 | */ | 381 | */ |
380 | struct GNUNET_PQ_ResultSpec | 382 | struct GNUNET_PQ_ResultSpec |
381 | GNUNET_PQ_result_spec_absolute_time_nbo(const char *name, | 383 | GNUNET_PQ_result_spec_absolute_time_nbo (const char *name, |
382 | struct GNUNET_TIME_AbsoluteNBO *at); | 384 | struct GNUNET_TIME_AbsoluteNBO *at); |
383 | 385 | ||
384 | 386 | ||
385 | /** | 387 | /** |
@@ -390,7 +392,7 @@ GNUNET_PQ_result_spec_absolute_time_nbo(const char *name, | |||
390 | * @return array entry for the result specification to use | 392 | * @return array entry for the result specification to use |
391 | */ | 393 | */ |
392 | struct GNUNET_PQ_ResultSpec | 394 | struct GNUNET_PQ_ResultSpec |
393 | GNUNET_PQ_result_spec_uint16(const char *name, uint16_t *u16); | 395 | GNUNET_PQ_result_spec_uint16 (const char *name, uint16_t *u16); |
394 | 396 | ||
395 | 397 | ||
396 | /** | 398 | /** |
@@ -401,7 +403,7 @@ GNUNET_PQ_result_spec_uint16(const char *name, uint16_t *u16); | |||
401 | * @return array entry for the result specification to use | 403 | * @return array entry for the result specification to use |
402 | */ | 404 | */ |
403 | struct GNUNET_PQ_ResultSpec | 405 | struct GNUNET_PQ_ResultSpec |
404 | GNUNET_PQ_result_spec_uint32(const char *name, uint32_t *u32); | 406 | GNUNET_PQ_result_spec_uint32 (const char *name, uint32_t *u32); |
405 | 407 | ||
406 | 408 | ||
407 | /** | 409 | /** |
@@ -412,7 +414,7 @@ GNUNET_PQ_result_spec_uint32(const char *name, uint32_t *u32); | |||
412 | * @return array entry for the result specification to use | 414 | * @return array entry for the result specification to use |
413 | */ | 415 | */ |
414 | struct GNUNET_PQ_ResultSpec | 416 | struct GNUNET_PQ_ResultSpec |
415 | GNUNET_PQ_result_spec_uint64(const char *name, uint64_t *u64); | 417 | GNUNET_PQ_result_spec_uint64 (const char *name, uint64_t *u64); |
416 | 418 | ||
417 | 419 | ||
418 | /* ************************* pq.c functions ************************ */ | 420 | /* ************************* pq.c functions ************************ */ |
@@ -427,9 +429,9 @@ GNUNET_PQ_result_spec_uint64(const char *name, uint64_t *u64); | |||
427 | * @deprecated (should become an internal API) | 429 | * @deprecated (should become an internal API) |
428 | */ | 430 | */ |
429 | PGresult * | 431 | PGresult * |
430 | GNUNET_PQ_exec_prepared(PGconn *db_conn, | 432 | GNUNET_PQ_exec_prepared (PGconn *db_conn, |
431 | const char *name, | 433 | const char *name, |
432 | const struct GNUNET_PQ_QueryParam *params); | 434 | const struct GNUNET_PQ_QueryParam *params); |
433 | 435 | ||
434 | 436 | ||
435 | /** | 437 | /** |
@@ -444,9 +446,9 @@ GNUNET_PQ_exec_prepared(PGconn *db_conn, | |||
444 | * @deprecated (should become an internal API) | 446 | * @deprecated (should become an internal API) |
445 | */ | 447 | */ |
446 | int | 448 | int |
447 | GNUNET_PQ_extract_result(PGresult *result, | 449 | GNUNET_PQ_extract_result (PGresult *result, |
448 | struct GNUNET_PQ_ResultSpec *rs, | 450 | struct GNUNET_PQ_ResultSpec *rs, |
449 | int row); | 451 | int row); |
450 | 452 | ||
451 | 453 | ||
452 | /** | 454 | /** |
@@ -456,7 +458,7 @@ GNUNET_PQ_extract_result(PGresult *result, | |||
456 | * @param rs reult specification to clean up | 458 | * @param rs reult specification to clean up |
457 | */ | 459 | */ |
458 | void | 460 | void |
459 | GNUNET_PQ_cleanup_result(struct GNUNET_PQ_ResultSpec *rs); | 461 | GNUNET_PQ_cleanup_result (struct GNUNET_PQ_ResultSpec *rs); |
460 | 462 | ||
461 | 463 | ||
462 | /* ******************** pq_eval.c functions ************** */ | 464 | /* ******************** pq_eval.c functions ************** */ |
@@ -476,9 +478,9 @@ GNUNET_PQ_cleanup_result(struct GNUNET_PQ_ResultSpec *rs); | |||
476 | * @deprecated (low level, let's see if we can do with just the high-level functions) | 478 | * @deprecated (low level, let's see if we can do with just the high-level functions) |
477 | */ | 479 | */ |
478 | enum GNUNET_DB_QueryStatus | 480 | enum GNUNET_DB_QueryStatus |
479 | GNUNET_PQ_eval_result(PGconn *connection, | 481 | GNUNET_PQ_eval_result (PGconn *connection, |
480 | const char *statement_name, | 482 | const char *statement_name, |
481 | PGresult *result); | 483 | PGresult *result); |
482 | 484 | ||
483 | 485 | ||
484 | /** | 486 | /** |
@@ -498,9 +500,9 @@ GNUNET_PQ_eval_result(PGconn *connection, | |||
498 | * zero; if INSERT was successful, we return one. | 500 | * zero; if INSERT was successful, we return one. |
499 | */ | 501 | */ |
500 | enum GNUNET_DB_QueryStatus | 502 | enum GNUNET_DB_QueryStatus |
501 | GNUNET_PQ_eval_prepared_non_select(PGconn *connection, | 503 | GNUNET_PQ_eval_prepared_non_select (PGconn *connection, |
502 | const char *statement_name, | 504 | const char *statement_name, |
503 | const struct GNUNET_PQ_QueryParam *params); | 505 | const struct GNUNET_PQ_QueryParam *params); |
504 | 506 | ||
505 | 507 | ||
506 | /** | 508 | /** |
@@ -532,11 +534,11 @@ typedef void (*GNUNET_PQ_PostgresResultHandler) (void *cls, | |||
532 | * codes to `enum GNUNET_DB_QueryStatus`. | 534 | * codes to `enum GNUNET_DB_QueryStatus`. |
533 | */ | 535 | */ |
534 | enum GNUNET_DB_QueryStatus | 536 | enum GNUNET_DB_QueryStatus |
535 | GNUNET_PQ_eval_prepared_multi_select(PGconn *connection, | 537 | GNUNET_PQ_eval_prepared_multi_select (PGconn *connection, |
536 | const char *statement_name, | 538 | const char *statement_name, |
537 | const struct GNUNET_PQ_QueryParam *params, | 539 | const struct GNUNET_PQ_QueryParam *params, |
538 | GNUNET_PQ_PostgresResultHandler rh, | 540 | GNUNET_PQ_PostgresResultHandler rh, |
539 | void *rh_cls); | 541 | void *rh_cls); |
540 | 542 | ||
541 | 543 | ||
542 | /** | 544 | /** |
@@ -555,7 +557,7 @@ GNUNET_PQ_eval_prepared_multi_select(PGconn *connection, | |||
555 | * codes to `enum GNUNET_DB_QueryStatus`. | 557 | * codes to `enum GNUNET_DB_QueryStatus`. |
556 | */ | 558 | */ |
557 | enum GNUNET_DB_QueryStatus | 559 | enum GNUNET_DB_QueryStatus |
558 | GNUNET_PQ_eval_prepared_singleton_select( | 560 | GNUNET_PQ_eval_prepared_singleton_select ( |
559 | PGconn *connection, | 561 | PGconn *connection, |
560 | const char *statement_name, | 562 | const char *statement_name, |
561 | const struct GNUNET_PQ_QueryParam *params, | 563 | const struct GNUNET_PQ_QueryParam *params, |
@@ -569,7 +571,8 @@ GNUNET_PQ_eval_prepared_singleton_select( | |||
569 | * Information needed to prepare a list of SQL statements using | 571 | * Information needed to prepare a list of SQL statements using |
570 | * #GNUNET_PQ_prepare_statements(). | 572 | * #GNUNET_PQ_prepare_statements(). |
571 | */ | 573 | */ |
572 | struct GNUNET_PQ_PreparedStatement { | 574 | struct GNUNET_PQ_PreparedStatement |
575 | { | ||
573 | /** | 576 | /** |
574 | * Name of the statement. | 577 | * Name of the statement. |
575 | */ | 578 | */ |
@@ -605,9 +608,9 @@ struct GNUNET_PQ_PreparedStatement { | |||
605 | * @return initialized struct | 608 | * @return initialized struct |
606 | */ | 609 | */ |
607 | struct GNUNET_PQ_PreparedStatement | 610 | struct GNUNET_PQ_PreparedStatement |
608 | GNUNET_PQ_make_prepare(const char *name, | 611 | GNUNET_PQ_make_prepare (const char *name, |
609 | const char *sql, | 612 | const char *sql, |
610 | unsigned int num_args); | 613 | unsigned int num_args); |
611 | 614 | ||
612 | 615 | ||
613 | /** | 616 | /** |
@@ -620,8 +623,8 @@ GNUNET_PQ_make_prepare(const char *name, | |||
620 | * #GNUNET_SYSERR on error | 623 | * #GNUNET_SYSERR on error |
621 | */ | 624 | */ |
622 | int | 625 | int |
623 | GNUNET_PQ_prepare_statements(PGconn *connection, | 626 | GNUNET_PQ_prepare_statements (PGconn *connection, |
624 | const struct GNUNET_PQ_PreparedStatement *ps); | 627 | const struct GNUNET_PQ_PreparedStatement *ps); |
625 | 628 | ||
626 | 629 | ||
627 | /* ******************** pq_exec.c functions ************** */ | 630 | /* ******************** pq_exec.c functions ************** */ |
@@ -631,7 +634,8 @@ GNUNET_PQ_prepare_statements(PGconn *connection, | |||
631 | * Information needed to run a list of SQL statements using | 634 | * Information needed to run a list of SQL statements using |
632 | * #GNUNET_PQ_exec_statements(). | 635 | * #GNUNET_PQ_exec_statements(). |
633 | */ | 636 | */ |
634 | struct GNUNET_PQ_ExecuteStatement { | 637 | struct GNUNET_PQ_ExecuteStatement |
638 | { | ||
635 | /** | 639 | /** |
636 | * Actual SQL statement. | 640 | * Actual SQL statement. |
637 | */ | 641 | */ |
@@ -660,7 +664,7 @@ struct GNUNET_PQ_ExecuteStatement { | |||
660 | * @return initialized struct | 664 | * @return initialized struct |
661 | */ | 665 | */ |
662 | struct GNUNET_PQ_ExecuteStatement | 666 | struct GNUNET_PQ_ExecuteStatement |
663 | GNUNET_PQ_make_execute(const char *sql); | 667 | GNUNET_PQ_make_execute (const char *sql); |
664 | 668 | ||
665 | 669 | ||
666 | /** | 670 | /** |
@@ -671,7 +675,7 @@ GNUNET_PQ_make_execute(const char *sql); | |||
671 | * @return initialized struct | 675 | * @return initialized struct |
672 | */ | 676 | */ |
673 | struct GNUNET_PQ_ExecuteStatement | 677 | struct GNUNET_PQ_ExecuteStatement |
674 | GNUNET_PQ_make_try_execute(const char *sql); | 678 | GNUNET_PQ_make_try_execute (const char *sql); |
675 | 679 | ||
676 | 680 | ||
677 | /** | 681 | /** |
@@ -684,8 +688,8 @@ GNUNET_PQ_make_try_execute(const char *sql); | |||
684 | * #GNUNET_SYSERR on error | 688 | * #GNUNET_SYSERR on error |
685 | */ | 689 | */ |
686 | int | 690 | int |
687 | GNUNET_PQ_exec_statements(PGconn *connection, | 691 | GNUNET_PQ_exec_statements (PGconn *connection, |
688 | const struct GNUNET_PQ_ExecuteStatement *es); | 692 | const struct GNUNET_PQ_ExecuteStatement *es); |
689 | 693 | ||
690 | 694 | ||
691 | /* ******************** pq_connect.c functions ************** */ | 695 | /* ******************** pq_connect.c functions ************** */ |
@@ -700,7 +704,7 @@ GNUNET_PQ_exec_statements(PGconn *connection, | |||
700 | * @return NULL on error | 704 | * @return NULL on error |
701 | */ | 705 | */ |
702 | PGconn * | 706 | PGconn * |
703 | GNUNET_PQ_connect(const char *config_str); | 707 | GNUNET_PQ_connect (const char *config_str); |
704 | 708 | ||
705 | 709 | ||
706 | /** | 710 | /** |
@@ -712,8 +716,8 @@ GNUNET_PQ_connect(const char *config_str); | |||
712 | * @return the postgres handle, NULL on error | 716 | * @return the postgres handle, NULL on error |
713 | */ | 717 | */ |
714 | PGconn * | 718 | PGconn * |
715 | GNUNET_PQ_connect_with_cfg(const struct GNUNET_CONFIGURATION_Handle *cfg, | 719 | GNUNET_PQ_connect_with_cfg (const struct GNUNET_CONFIGURATION_Handle *cfg, |
716 | const char *section); | 720 | const char *section); |
717 | 721 | ||
718 | 722 | ||
719 | #endif /* GNUNET_PQ_LIB_H_ */ | 723 | #endif /* GNUNET_PQ_LIB_H_ */ |