diff options
Diffstat (limited to 'src/include/gnunet_pq_lib.h')
-rw-r--r-- | src/include/gnunet_pq_lib.h | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/src/include/gnunet_pq_lib.h b/src/include/gnunet_pq_lib.h index d52c0e40d..4cbc2a139 100644 --- a/src/include/gnunet_pq_lib.h +++ b/src/include/gnunet_pq_lib.h | |||
@@ -25,6 +25,7 @@ | |||
25 | #ifndef GNUNET_PQ_LIB_H | 25 | #ifndef GNUNET_PQ_LIB_H |
26 | #define GNUNET_PQ_LIB_H | 26 | #define GNUNET_PQ_LIB_H |
27 | 27 | ||
28 | |||
28 | #include <libpq-fe.h> | 29 | #include <libpq-fe.h> |
29 | #include "gnunet_util_lib.h" | 30 | #include "gnunet_util_lib.h" |
30 | #include "gnunet_db_lib.h" | 31 | #include "gnunet_db_lib.h" |
@@ -147,6 +148,39 @@ GNUNET_PQ_query_param_bool (bool b); | |||
147 | 148 | ||
148 | 149 | ||
149 | /** | 150 | /** |
151 | * Information for an array argument. | ||
152 | */ | ||
153 | struct GNUNET_PQ_ArraySpec | ||
154 | { | ||
155 | /** | ||
156 | * Number of dimensions of the array | ||
157 | */ | ||
158 | unsigned int ndims; | ||
159 | |||
160 | /** | ||
161 | * Array of @e ndims lengths of the array | ||
162 | */ | ||
163 | unsigned int *lens; | ||
164 | |||
165 | /** | ||
166 | * One-dimensional array of pointers to conversion functions for the | ||
167 | * elements in the array. | ||
168 | */ | ||
169 | const struct GNUNET_PQ_QueryParam *ae; | ||
170 | |||
171 | }; | ||
172 | |||
173 | |||
174 | /** | ||
175 | * Generate query parameter for an array. | ||
176 | * | ||
177 | * @param as array specification | ||
178 | */ | ||
179 | struct GNUNET_PQ_QueryParam | ||
180 | GNUNET_PQ_query_param_array (const struct GNUNET_PQ_ArraySpec *as); | ||
181 | |||
182 | |||
183 | /** | ||
150 | * Generate fixed-size query parameter with size determined | 184 | * Generate fixed-size query parameter with size determined |
151 | * by variable type. | 185 | * by variable type. |
152 | * | 186 | * |
@@ -1107,6 +1141,17 @@ GNUNET_PQ_event_notify (struct GNUNET_PQ_Context *db, | |||
1107 | 1141 | ||
1108 | 1142 | ||
1109 | /** | 1143 | /** |
1144 | * Compute the channel that one should notify upon | ||
1145 | * for the given event specification. | ||
1146 | * | ||
1147 | * @param es event specification | ||
1148 | * @return channel to notify upon | ||
1149 | */ | ||
1150 | char * | ||
1151 | GNUNET_PG_get_event_notify_channel (const struct GNUNET_DB_EventHeaderP *es); | ||
1152 | |||
1153 | |||
1154 | /** | ||
1110 | * Within the @a db context, run all the SQL files | 1155 | * Within the @a db context, run all the SQL files |
1111 | * from the @a load_path from 0000-9999.sql (as long | 1156 | * from the @a load_path from 0000-9999.sql (as long |
1112 | * as the files exist contiguously). | 1157 | * as the files exist contiguously). |