diff options
author | Christian Grothoff <christian@grothoff.org> | 2023-02-05 17:37:02 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2023-02-05 17:37:08 +0100 |
commit | 0cfa9293a7f7b9b2bad8ac102fd1d3cf0e76a816 (patch) | |
tree | 5d699e9073f6353455b219512f71ec2401ce2f50 /src/pq/pq_eval.c | |
parent | 54638eb127fa967972bdbc7e887f12948d037409 (diff) | |
download | gnunet-0cfa9293a7f7b9b2bad8ac102fd1d3cf0e76a816.tar.gz gnunet-0cfa9293a7f7b9b2bad8ac102fd1d3cf0e76a816.zip |
PQ: remove duplicated comments, and send stderr from psql to /dev/null
Diffstat (limited to 'src/pq/pq_eval.c')
-rw-r--r-- | src/pq/pq_eval.c | 59 |
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 | */ | ||
58 | enum GNUNET_DB_QueryStatus | 45 | enum GNUNET_DB_QueryStatus |
59 | GNUNET_PQ_eval_result (struct GNUNET_PQ_Context *db, | 46 | GNUNET_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 | */ | ||
163 | enum GNUNET_DB_QueryStatus | 134 | enum GNUNET_DB_QueryStatus |
164 | GNUNET_PQ_eval_prepared_non_select (struct GNUNET_PQ_Context *db, | 135 | GNUNET_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 | */ | ||
208 | enum GNUNET_DB_QueryStatus | 164 | enum GNUNET_DB_QueryStatus |
209 | GNUNET_PQ_eval_prepared_multi_select (struct GNUNET_PQ_Context *db, | 165 | GNUNET_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 | */ | ||
257 | enum GNUNET_DB_QueryStatus | 198 | enum GNUNET_DB_QueryStatus |
258 | GNUNET_PQ_eval_prepared_singleton_select ( | 199 | GNUNET_PQ_eval_prepared_singleton_select ( |
259 | struct GNUNET_PQ_Context *db, | 200 | struct GNUNET_PQ_Context *db, |