aboutsummaryrefslogtreecommitdiff
path: root/src/pq/pq_eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pq/pq_eval.c')
-rw-r--r--src/pq/pq_eval.c59
1 files changed, 0 insertions, 59 deletions
diff --git a/src/pq/pq_eval.c b/src/pq/pq_eval.c
index cc16c7864..e31475e13 100644
--- a/src/pq/pq_eval.c
+++ b/src/pq/pq_eval.c
@@ -42,19 +42,6 @@
42#define PQ_DIAG_SQLSTATE_SERIALIZATION_FAILURE "40001" 42#define PQ_DIAG_SQLSTATE_SERIALIZATION_FAILURE "40001"
43 43
44 44
45/**
46 * Check the @a result's error code to see what happened.
47 * Also logs errors.
48 *
49 * @param db database to execute the statement with
50 * @param statement_name name of the statement that created @a result
51 * @param result result to check
52 * @return status code from the result, mapping PQ status
53 * codes to `enum GNUNET_DB_QueryStatus`. Never
54 * returns positive values as this function does
55 * not look at the result set.
56 * @deprecated (low level, let's see if we can do with just the high-level functions)
57 */
58enum GNUNET_DB_QueryStatus 45enum GNUNET_DB_QueryStatus
59GNUNET_PQ_eval_result (struct GNUNET_PQ_Context *db, 46GNUNET_PQ_eval_result (struct GNUNET_PQ_Context *db,
60 const char *statement_name, 47 const char *statement_name,
@@ -144,22 +131,6 @@ GNUNET_PQ_eval_result (struct GNUNET_PQ_Context *db,
144} 131}
145 132
146 133
147/**
148 * Execute a named prepared @a statement that is NOT a SELECT
149 * statement in @a connection using the given @a params. Returns the
150 * resulting session state.
151 *
152 * @param db database to execute the statement with
153 * @param statement_name name of the statement
154 * @param params parameters to give to the statement (#GNUNET_PQ_query_param_end-terminated)
155 * @return status code from the result, mapping PQ status
156 * codes to `enum GNUNET_DB_QueryStatus`. If the
157 * statement was a DELETE or UPDATE statement, the
158 * number of affected rows is returned.; if the
159 * statement was an INSERT statement, and no row
160 * was added due to a UNIQUE violation, we return
161 * zero; if INSERT was successful, we return one.
162 */
163enum GNUNET_DB_QueryStatus 134enum GNUNET_DB_QueryStatus
164GNUNET_PQ_eval_prepared_non_select (struct GNUNET_PQ_Context *db, 135GNUNET_PQ_eval_prepared_non_select (struct GNUNET_PQ_Context *db,
165 const char *statement_name, 136 const char *statement_name,
@@ -190,21 +161,6 @@ GNUNET_PQ_eval_prepared_non_select (struct GNUNET_PQ_Context *db,
190} 161}
191 162
192 163
193/**
194 * Execute a named prepared @a statement that is a SELECT statement
195 * which may return multiple results in @a connection using the given
196 * @a params. Call @a rh with the results. Returns the query
197 * status including the number of results given to @a rh (possibly zero).
198 * @a rh will not have been called if the return value is negative.
199 *
200 * @param db database to execute the statement with
201 * @param statement_name name of the statement
202 * @param params parameters to give to the statement (#GNUNET_PQ_query_param_end-terminated)
203 * @param rh function to call with the result set, NULL to ignore
204 * @param rh_cls closure to pass to @a rh
205 * @return status code from the result, mapping PQ status
206 * codes to `enum GNUNET_DB_QueryStatus`.
207 */
208enum GNUNET_DB_QueryStatus 164enum GNUNET_DB_QueryStatus
209GNUNET_PQ_eval_prepared_multi_select (struct GNUNET_PQ_Context *db, 165GNUNET_PQ_eval_prepared_multi_select (struct GNUNET_PQ_Context *db,
210 const char *statement_name, 166 const char *statement_name,
@@ -239,21 +195,6 @@ GNUNET_PQ_eval_prepared_multi_select (struct GNUNET_PQ_Context *db,
239} 195}
240 196
241 197
242/**
243 * Execute a named prepared @a statement that is a SELECT statement
244 * which must return a single result in @a connection using the given
245 * @a params. Stores the result (if any) in @a rs, which the caller
246 * must then clean up using #GNUNET_PQ_cleanup_result() if the return
247 * value was #GNUNET_DB_STATUS_SUCCESS_ONE_RESULT. Returns the
248 * resulting session status.
249 *
250 * @param db database to execute the statement with
251 * @param statement_name name of the statement
252 * @param params parameters to give to the statement (#GNUNET_PQ_query_param_end-terminated)
253 * @param[in,out] rs result specification to use for storing the result of the query
254 * @return status code from the result, mapping PQ status
255 * codes to `enum GNUNET_DB_QueryStatus`.
256 */
257enum GNUNET_DB_QueryStatus 198enum GNUNET_DB_QueryStatus
258GNUNET_PQ_eval_prepared_singleton_select ( 199GNUNET_PQ_eval_prepared_singleton_select (
259 struct GNUNET_PQ_Context *db, 200 struct GNUNET_PQ_Context *db,