-docs
authorChristian Grothoff <christian@grothoff.org>
Thu, 22 Mar 2012 18:12:39 +0000 (18:12 +0000)
committerChristian Grothoff <christian@grothoff.org>
Thu, 22 Mar 2012 18:12:39 +0000 (18:12 +0000)
src/datacache/plugin_datacache_postgres.c
src/datastore/plugin_datastore_postgres.c

index 3486d76dce12a55f713988918e8930f28262eecc..0fabdb4c2cf99daa9d0f9004fb312e427173e6d0 100644 (file)
@@ -87,7 +87,10 @@ check_result (struct Plugin *plugin, PGresult * ret, int expected_status,
 
 /**
  * Run simple SQL statement (without results).
- */
+ *
+ * @param plugin global context
+ * @param sql statement to run
+ * @param line code line for error reporting */
 static int
 pq_exec (struct Plugin *plugin, const char *sql, int line)
 {
@@ -104,6 +107,13 @@ pq_exec (struct Plugin *plugin, const char *sql, int line)
 
 /**
  * Prepare SQL statement.
+ *
+ * @param plugin global context
+ * @param name name for the prepared SQL statement
+ * @param sql SQL code to prepare
+ * @param nparams number of parameters in sql
+ * @param line code line for error reporting
+ * @return GNUNET_OK on success
  */
 static int
 pq_prepare (struct Plugin *plugin, const char *name, const char *sql,
@@ -122,6 +132,8 @@ pq_prepare (struct Plugin *plugin, const char *name, const char *sql,
 
 /**
  * @brief Get a database handle
+ *
+ * @param plugin global context
  * @return GNUNET_OK on success, GNUNET_SYSERR on error
  */
 static int
@@ -185,7 +197,6 @@ init_connection (struct Plugin *plugin)
     }
   }
   PQclear (ret);
-#if 1
   ret =
       PQexec (plugin->dbh,
               "ALTER TABLE gn090dc ALTER value SET STORAGE EXTERNAL");
@@ -208,7 +219,6 @@ init_connection (struct Plugin *plugin)
     return GNUNET_SYSERR;
   }
   PQclear (ret);
-#endif
   if ((GNUNET_OK !=
        pq_prepare (plugin, "getkt",
                    "SELECT discard_time,type,value FROM gn090dc "
@@ -241,6 +251,8 @@ init_connection (struct Plugin *plugin)
  * Delete the row identified by the given rowid (qid
  * in postgres).
  *
+ * @param plugin global context
+ * @param rowid which row to delete
  * @return GNUNET_OK on success
  */
 static int
index 16393c23c29e7b3729107802e272bd9cb880c41d..31ba09a8711676987f8a04cfba7fa818bdcae0d2 100644 (file)
@@ -339,7 +339,7 @@ init_connection (struct Plugin *plugin)
  * @return GNUNET_OK on success
  */
 static int
-delete_by_rowid (struct Plugin *plugin, unsigned int rowid)
+delete_by_rowid (struct Plugin *plugin, uint32_t rowid)
 {
   uint32_t browid;
   const char *paramValues[] = { (const char *) &browid };