gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnunet] 01/02: PQ: remove duplicated comments, and send stderr from psq


From: gnunet
Subject: [gnunet] 01/02: PQ: remove duplicated comments, and send stderr from psql to /dev/null
Date: Sun, 05 Feb 2023 21:00:11 +0100

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository gnunet.

commit 0cfa9293a7f7b9b2bad8ac102fd1d3cf0e76a816
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Sun Feb 5 17:37:02 2023 +0100

    PQ: remove duplicated comments, and send stderr from psql to /dev/null
---
 src/pq/pq_connect.c |  2 +-
 src/pq/pq_eval.c    | 59 -----------------------------------------------------
 src/pq/pq_exec.c    | 13 ------------
 3 files changed, 1 insertion(+), 73 deletions(-)

diff --git a/src/pq/pq_connect.c b/src/pq/pq_connect.c
index e8617a5c9..02af17c8c 100644
--- a/src/pq/pq_connect.c
+++ b/src/pq/pq_connect.c
@@ -166,7 +166,7 @@ GNUNET_PQ_exec_sql (struct GNUNET_PQ_Context *db,
               "Applying SQL file `%s' on database %s\n",
               fn,
               db->config_str);
-  psql = GNUNET_OS_start_process (GNUNET_OS_INHERIT_STD_ERR,
+  psql = GNUNET_OS_start_process (GNUNET_OS_INHERIT_STD_NONE,
                                   NULL,
                                   NULL,
                                   NULL,
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 @@
 #define PQ_DIAG_SQLSTATE_SERIALIZATION_FAILURE "40001"
 
 
-/**
- * Check the @a result's error code to see what happened.
- * Also logs errors.
- *
- * @param db database to execute the statement with
- * @param statement_name name of the statement that created @a result
- * @param result result to check
- * @return status code from the result, mapping PQ status
- *         codes to `enum GNUNET_DB_QueryStatus`.  Never
- *         returns positive values as this function does
- *         not look at the result set.
- * @deprecated (low level, let's see if we can do with just the high-level 
functions)
- */
 enum GNUNET_DB_QueryStatus
 GNUNET_PQ_eval_result (struct GNUNET_PQ_Context *db,
                        const char *statement_name,
@@ -144,22 +131,6 @@ GNUNET_PQ_eval_result (struct GNUNET_PQ_Context *db,
 }
 
 
-/**
- * Execute a named prepared @a statement that is NOT a SELECT
- * statement in @a connection using the given @a params.  Returns the
- * resulting session state.
- *
- * @param db database to execute the statement with
- * @param statement_name name of the statement
- * @param params parameters to give to the statement 
(#GNUNET_PQ_query_param_end-terminated)
- * @return status code from the result, mapping PQ status
- *         codes to `enum GNUNET_DB_QueryStatus`.  If the
- *         statement was a DELETE or UPDATE statement, the
- *         number of affected rows is returned.; if the
- *         statement was an INSERT statement, and no row
- *         was added due to a UNIQUE violation, we return
- *         zero; if INSERT was successful, we return one.
- */
 enum GNUNET_DB_QueryStatus
 GNUNET_PQ_eval_prepared_non_select (struct GNUNET_PQ_Context *db,
                                     const char *statement_name,
@@ -190,21 +161,6 @@ GNUNET_PQ_eval_prepared_non_select (struct 
GNUNET_PQ_Context *db,
 }
 
 
-/**
- * Execute a named prepared @a statement that is a SELECT statement
- * which may return multiple results in @a connection using the given
- * @a params.  Call @a rh with the results.  Returns the query
- * status including the number of results given to @a rh (possibly zero).
- * @a rh will not have been called if the return value is negative.
- *
- * @param db database to execute the statement with
- * @param statement_name name of the statement
- * @param params parameters to give to the statement 
(#GNUNET_PQ_query_param_end-terminated)
- * @param rh function to call with the result set, NULL to ignore
- * @param rh_cls closure to pass to @a rh
- * @return status code from the result, mapping PQ status
- *         codes to `enum GNUNET_DB_QueryStatus`.
- */
 enum GNUNET_DB_QueryStatus
 GNUNET_PQ_eval_prepared_multi_select (struct GNUNET_PQ_Context *db,
                                       const char *statement_name,
@@ -239,21 +195,6 @@ GNUNET_PQ_eval_prepared_multi_select (struct 
GNUNET_PQ_Context *db,
 }
 
 
-/**
- * Execute a named prepared @a statement that is a SELECT statement
- * which must return a single result in @a connection using the given
- * @a params.  Stores the result (if any) in @a rs, which the caller
- * must then clean up using #GNUNET_PQ_cleanup_result() if the return
- * value was #GNUNET_DB_STATUS_SUCCESS_ONE_RESULT.  Returns the
- * resulting session status.
- *
- * @param db database to execute the statement with
- * @param statement_name name of the statement
- * @param params parameters to give to the statement 
(#GNUNET_PQ_query_param_end-terminated)
- * @param[in,out] rs result specification to use for storing the result of the 
query
- * @return status code from the result, mapping PQ status
- *         codes to `enum GNUNET_DB_QueryStatus`.
- */
 enum GNUNET_DB_QueryStatus
 GNUNET_PQ_eval_prepared_singleton_select (
   struct GNUNET_PQ_Context *db,
diff --git a/src/pq/pq_exec.c b/src/pq/pq_exec.c
index 33fe8733d..1fd8c5068 100644
--- a/src/pq/pq_exec.c
+++ b/src/pq/pq_exec.c
@@ -26,12 +26,6 @@
 #include "pq.h"
 
 
-/**
- * Create a `struct GNUNET_PQ_ExecuteStatement` where errors are fatal.
- *
- * @param sql actual SQL statement
- * @return initialized struct
- */
 struct GNUNET_PQ_ExecuteStatement
 GNUNET_PQ_make_execute (const char *sql)
 {
@@ -44,13 +38,6 @@ GNUNET_PQ_make_execute (const char *sql)
 }
 
 
-/**
- * Create a `struct GNUNET_PQ_ExecuteStatement` where errors should
- * be tolerated.
- *
- * @param sql actual SQL statement
- * @return initialized struct
- */
 struct GNUNET_PQ_ExecuteStatement
 GNUNET_PQ_make_try_execute (const char *sql)
 {

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]