aboutsummaryrefslogtreecommitdiff
path: root/src/datacache
diff options
context:
space:
mode:
authorgrothoff <grothoff@140774ce-b5e7-0310-ab8b-a85725594a96>2012-03-22 18:12:39 +0000
committergrothoff <grothoff@140774ce-b5e7-0310-ab8b-a85725594a96>2012-03-22 18:12:39 +0000
commit0170d9644f3cf748ebe6b54d6171671d85b498bc (patch)
tree8fb62d98fd3d4462730c1fafec7b74ff1f96642d /src/datacache
parent74e945f26e285cbea91ee41660bd677d5fec4018 (diff)
-docs
git-svn-id: https://gnunet.org/svn/gnunet@20686 140774ce-b5e7-0310-ab8b-a85725594a96
Diffstat (limited to 'src/datacache')
-rw-r--r--src/datacache/plugin_datacache_postgres.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/datacache/plugin_datacache_postgres.c b/src/datacache/plugin_datacache_postgres.c
index 3486d76dce..0fabdb4c2c 100644
--- a/src/datacache/plugin_datacache_postgres.c
+++ b/src/datacache/plugin_datacache_postgres.c
@@ -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