diff options
author | Bill King <bill.king@nokia.com> | 2009-10-06 01:41:39 (GMT) |
---|---|---|
committer | Jason McDonald <jason.mcdonald@nokia.com> | 2009-10-06 03:18:26 (GMT) |
commit | be0d6cb54e4c16088dc48dd6301a73d738e274dd (patch) | |
tree | 57ba7b2d9504938fd82486026ac836746feedd39 | |
parent | 577d911dcd2db46a4b8a88ab2d4d466cf9e48e0a (diff) | |
download | Qt-be0d6cb54e4c16088dc48dd6301a73d738e274dd.zip Qt-be0d6cb54e4c16088dc48dd6301a73d738e274dd.tar.gz Qt-be0d6cb54e4c16088dc48dd6301a73d738e274dd.tar.bz2 |
Update documentation for setForwardOnly.
(cherry picked from commit c768694764e8bc32a7152b80653eef564631452a)
-rw-r--r-- | src/sql/kernel/qsqlquery.cpp | 9 | ||||
-rw-r--r-- | src/sql/kernel/qsqlresult.cpp | 7 |
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) { |