summaryrefslogtreecommitdiffstats
path: root/src/sql/kernel
diff options
context:
space:
mode:
authorBill King <bill.king@nokia.com>2009-10-06 01:41:39 (GMT)
committerBill King <bill.king@nokia.com>2009-10-06 01:44:01 (GMT)
commitc768694764e8bc32a7152b80653eef564631452a (patch)
treed30f7c6b284e79bc9b76a3a5234b05989e2ac4b9 /src/sql/kernel
parent32b74ee804d6e79420ba00683c7fff1cc8d56230 (diff)
downloadQt-c768694764e8bc32a7152b80653eef564631452a.zip
Qt-c768694764e8bc32a7152b80653eef564631452a.tar.gz
Qt-c768694764e8bc32a7152b80653eef564631452a.tar.bz2
Update documentation for setForwardOnly.
Diffstat (limited to 'src/sql/kernel')
-rw-r--r--src/sql/kernel/qsqlquery.cpp9
-rw-r--r--src/sql/kernel/qsqlresult.cpp7
2 files changed, 13 insertions, 3 deletions
diff --git a/src/sql/kernel/qsqlquery.cpp b/src/sql/kernel/qsqlquery.cpp
index dfe30e7..5125546 100644
--- a/src/sql/kernel/qsqlquery.cpp
+++ b/src/sql/kernel/qsqlquery.cpp
@@ -811,13 +811,18 @@ bool QSqlQuery::isForwardOnly() const
Forward only mode can be (depending on the driver) more memory
efficient since results do not need to be cached. It will also
improve performance on some databases. For this to be true, you must
- call \c setForwardMode() before the query is prepared or executed.
+ call \c setForwardOnly() before the query is prepared or executed.
Note that the constructor that takes a query and a database may
execute the query.
Forward only mode is off by default.
- \sa isForwardOnly(), next(), seek()
+ Setting forward only to false is a suggestion to the database engine,
+ which has the final say on whether a result set is forward only or
+ scrollable. isForwardOnly() will always return the correct status of
+ the result set.
+
+ \sa isForwardOnly(), next(), seek(), QSqlResult::setForwardOnly()
*/
void QSqlQuery::setForwardOnly(bool forward)
{
diff --git a/src/sql/kernel/qsqlresult.cpp b/src/sql/kernel/qsqlresult.cpp
index 791b8a6..efca595 100644
--- a/src/sql/kernel/qsqlresult.cpp
+++ b/src/sql/kernel/qsqlresult.cpp
@@ -559,7 +559,12 @@ bool QSqlResult::isForwardOnly() const
mode needs much less memory since results do not have to be
cached. By default, this feature is disabled.
- \sa isForwardOnly(), fetchNext()
+ Setting forward only to false is a suggestion to the database engine,
+ which has the final say on whether a result set is forward only or
+ scrollable. isForwardOnly() will always return the correct status of
+ the result set.
+
+ \sa isForwardOnly(), fetchNext(), QSqlQuery::setForwardOnly()
*/
void QSqlResult::setForwardOnly(bool forward)
{