summaryrefslogtreecommitdiffstats
path: root/src/sql/kernel/qsqlresult.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/sql/kernel/qsqlresult.cpp')
-rw-r--r--src/sql/kernel/qsqlresult.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/sql/kernel/qsqlresult.cpp b/src/sql/kernel/qsqlresult.cpp
index f79c1c71cd..cdb1379502 100644
--- a/src/sql/kernel/qsqlresult.cpp
+++ b/src/sql/kernel/qsqlresult.cpp
@@ -565,6 +565,14 @@ bool QSqlResult::isForwardOnly() const
\note Calling setForwardOnly after execution of the query will result
in unexpected results at best, and crashes at worst.
+ \note To make sure the forward-only query completed successfully,
+ the application should check lastError() for an error not only after
+ executing the query, but also after navigating the query results.
+
+ \warning PostgreSQL: While navigating the query results in forward-only
+ mode, do not execute any other SQL command on the same database
+ connection. This will cause the query results to be lost.
+
\sa isForwardOnly(), fetchNext(), QSqlQuery::setForwardOnly()
*/
void QSqlResult::setForwardOnly(bool forward)
@@ -1002,6 +1010,10 @@ bool QSqlResult::nextResult()
\warning The handle can be NULL if the result was not executed yet.
+ \warning PostgreSQL: in forward-only mode, the handle of QSqlResult can change
+ after calling fetch(), fetchFirst(), fetchLast(), fetchNext(), fetchPrevious(),
+ nextResult().
+
The handle returned here is database-dependent, you should query the type
name of the variant before accessing it.