diff options
author | Mark Brand <mabrand@mabrand.nl> | 2016-02-18 14:38:39 +0100 |
---|---|---|
committer | Mark Brand <mabrand@mabrand.nl> | 2016-02-24 16:38:09 +0000 |
commit | 1db9962cef140971d18110bb76486c40db373b8f (patch) | |
tree | d6603b34d490e6264e3e192811efb8462ed3174b /src/sql/kernel | |
parent | 696a4bc2f96fb84c38ff40507608e834d2cd79c7 (diff) |
QSqlDriver::sqlStatement: documentation fix
Change-Id: I12bd612c48020594b5377b04aeccc51f7c4be53d
Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
Reviewed-by: Vyacheslav Grigoryev <armagvvg@gmail.com>
Diffstat (limited to 'src/sql/kernel')
-rw-r--r-- | src/sql/kernel/qsqldriver.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/sql/kernel/qsqldriver.cpp b/src/sql/kernel/qsqldriver.cpp index 9ee8d67f56..adaeb8c846 100644 --- a/src/sql/kernel/qsqldriver.cpp +++ b/src/sql/kernel/qsqldriver.cpp @@ -457,6 +457,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 |