aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_sq_lib.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/gnunet_sq_lib.h')
-rw-r--r--src/include/gnunet_sq_lib.h23
1 files changed, 17 insertions, 6 deletions
diff --git a/src/include/gnunet_sq_lib.h b/src/include/gnunet_sq_lib.h
index a068650ac..1606d1129 100644
--- a/src/include/gnunet_sq_lib.h
+++ b/src/include/gnunet_sq_lib.h
@@ -21,7 +21,7 @@
21#ifndef GNUNET_SQ_LIB_H 21#ifndef GNUNET_SQ_LIB_H
22#define GNUNET_SQ_LIB_H 22#define GNUNET_SQ_LIB_H
23 23
24#include <sqlite/sqlite3.h> 24#include <sqlite3.h>
25#include "gnunet_util_lib.h" 25#include "gnunet_util_lib.h"
26 26
27 27
@@ -186,7 +186,8 @@ GNUNET_SQ_query_param_uint64 (const uint64_t *x);
186 * 186 *
187 * @param cls closure 187 * @param cls closure
188 * @param result where to extract data from 188 * @param result where to extract data from
189 * @param int row to extract data from 189 * @param row row to extract data from
190 * @param column column to extract data from
190 * @param[in,out] dst_size where to store size of result, may be NULL 191 * @param[in,out] dst_size where to store size of result, may be NULL
191 * @param[out] dst where to store the result 192 * @param[out] dst where to store the result
192 * @return 193 * @return
@@ -197,20 +198,25 @@ typedef int
197(*GNUNET_SQ_ResultConverter)(void *cls, 198(*GNUNET_SQ_ResultConverter)(void *cls,
198 sqlite3_stmt *result, 199 sqlite3_stmt *result,
199 int row, 200 int row,
201 unsigned int column,
200 size_t *dst_size, 202 size_t *dst_size,
201 void *dst); 203 void *dst);
202 204
203 205
204/** 206/**
207 * @brief Description of a DB result cell.
208 */
209struct GNUNET_SQ_ResultSpec;
210
211
212/**
205 * Function called to clean up memory allocated 213 * Function called to clean up memory allocated
206 * by a #GNUNET_SQ_ResultConverter. 214 * by a #GNUNET_SQ_ResultConverter.
207 * 215 *
208 * @param cls closure 216 * @param cls closure
209 * @param rd result data to clean up
210 */ 217 */
211typedef void 218typedef void
212(*GNUNET_SQ_ResultCleanup)(void *cls, 219(*GNUNET_SQ_ResultCleanup)(void *cls);
213 void *rd);
214 220
215 221
216/** 222/**
@@ -252,6 +258,11 @@ struct GNUNET_SQ_ResultSpec
252 */ 258 */
253 size_t *result_size; 259 size_t *result_size;
254 260
261 /**
262 * Number of parameters (columns) eaten by this operation.
263 */
264 unsigned int num_params;
265
255}; 266};
256 267
257 268
@@ -407,7 +418,7 @@ GNUNET_SQ_bind (sqlite3_stmt *stmt,
407 * @param[in,out] rs result specification to extract for 418 * @param[in,out] rs result specification to extract for
408 * @param row row from the result to extract 419 * @param row row from the result to extract
409 * @return 420 * @return
410 * #GNUNET_YES if all results could be extracted 421 * #GNUNET_OK if all results could be extracted
411 * #GNUNET_SYSERR if a result was invalid (non-existing field) 422 * #GNUNET_SYSERR if a result was invalid (non-existing field)
412 */ 423 */
413int 424int