Module: sip-router
Branch: janakj/postgres
Commit: be78aade192c328f6c5e567334340ccb24a94484
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=be78aad…
Author: Henning Westerholt <henning.westerholt(a)1und1.de>
Committer: Henning Westerholt <henning.westerholt(a)1und1.de>
Date: Fri Oct 17 08:01:23 2008 +0000
- docs extension: explain fetch_result functionality better to prevent errors
because of wrong usage, found from Juha Heinanen
git-svn-id:
https://openser.svn.sourceforge.net/svnroot/openser/trunk@5088
689a6050-402a-0410-94f2-e92a70836424
---
modules/db_postgres/km_dbase.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/modules/db_postgres/km_dbase.c b/modules/db_postgres/km_dbase.c
index 38bc36f..4ef3343 100644
--- a/modules/db_postgres/km_dbase.c
+++ b/modules/db_postgres/km_dbase.c
@@ -161,7 +161,15 @@ static int db_postgres_submit_query(const db_con_t* _con, const str*
_s)
/*!
- * \brief Gets a partial result set
+ * \brief Gets a partial result set, fetch rows from a result
+ *
+ * Gets a partial result set, fetch a number of rows from a database result.
+ * This function initialize the given result structure on the first run, and
+ * fetches the nrows number of rows. On subsequenting runs, it uses the
+ * existing result and fetches more rows, until it reaches the end of the
+ * result set. Because of this the result needs to be null in the first
+ * invocation of the function. If the number of wanted rows is zero, the
+ * function returns anything with a result of zero.
* \param _con database connection
* \param _res result set
* \param nrows number of fetches rows