summaryrefslogtreecommitdiffstats
path: root/src/sql
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@theqtcompany.com>2016-02-29 12:34:31 +0100
committerLiang Qi <liang.qi@theqtcompany.com>2016-02-29 12:34:31 +0100
commita224dfc9d19757734bf49fcefdeaad5d855dfe98 (patch)
tree83b61bea7fa243557febe9652f3f16d265a2689a /src/sql
parentbe84480785b9686dc09937fa33b685de7cc570f1 (diff)
parentf253f4c3310655933266f62e90f46fd12b5c49e4 (diff)
Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts: tests/auto/corelib/io/qprocess/tst_qprocess.cpp Change-Id: Ib6955eb874b516b185b45d6c38cec646fbaa95f4
Diffstat (limited to 'src/sql')
-rw-r--r--src/sql/kernel/qsqldriver.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/sql/kernel/qsqldriver.cpp b/src/sql/kernel/qsqldriver.cpp
index ac51941f43..ad5207cf6e 100644
--- a/src/sql/kernel/qsqldriver.cpp
+++ b/src/sql/kernel/qsqldriver.cpp
@@ -472,6 +472,17 @@ QString QSqlDriver::stripDelimiters(const QString &identifier, IdentifierType ty
This method can be used to manipulate tables without having to worry
about database-dependent SQL dialects. For non-prepared statements,
the values will be properly escaped.
+
+ In the WHERE statement, each non-null field of \a rec specifies a
+ filter condition of equality to the field value, or if prepared, a
+ placeholder. However, prepared or not, a null field specifies the
+ condition IS NULL and never introduces a placeholder. The
+ application must not attempt to bind data for the null field during
+ execution. The field must be set to some non-null value if a
+ placeholder is desired. Furthermore, since non-null fields specify
+ equality conditions and SQL NULL is not equal to anything, even
+ itself, it is generally not useful to bind a null to a placeholder.
+
*/
QString QSqlDriver::sqlStatement(StatementType type, const QString &tableName,
const QSqlRecord &rec, bool preparedStatement) const