diff options
author | Marcel Krems <m.krems@software-vision.eu> | 2014-06-17 12:40:31 +0200 |
---|---|---|
committer | Mark Brand <mabrand@mabrand.nl> | 2014-09-08 16:18:19 +0200 |
commit | e6857b7ebccc6d7fbd5c77acbd3b0f33132bc068 (patch) | |
tree | fb0a3104eafb420c8c6d42c28e7101b29e471804 /src | |
parent | 61b47cd16693096072c1270bc5c7ee62873c0425 (diff) |
Updated QSql{Query,Result}::bindValue doc to reflect the current state.
Since 5.0 it is possible to use one call to bindValue to bind
values to multiple placeholders with the same name.
Task-number: QTBUG-23360
Change-Id: Ic838150d25dd07bca7bc9e5d91ab3362a73833d6
Reviewed-by: Matt Newell <newellm@blur.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
Diffstat (limited to 'src')
-rw-r--r-- | src/sql/kernel/qsqlquery.cpp | 6 | ||||
-rw-r--r-- | src/sql/kernel/qsqlresult.cpp | 6 |
2 files changed, 0 insertions, 12 deletions
diff --git a/src/sql/kernel/qsqlquery.cpp b/src/sql/kernel/qsqlquery.cpp index 6b13eb02ed..b98e2baf1e 100644 --- a/src/sql/kernel/qsqlquery.cpp +++ b/src/sql/kernel/qsqlquery.cpp @@ -1063,12 +1063,6 @@ bool QSqlQuery::execBatch(BatchExecutionMode mode) To bind a NULL value, use a null QVariant; for example, use \c {QVariant(QVariant::String)} if you are binding a string. - Values cannot be bound to multiple locations in the query, eg: - \code - INSERT INTO testtable (id, name, samename) VALUES (:id, :name, :name) - \endcode - Binding to name will bind to the first :name, but not the second. - \sa addBindValue(), prepare(), exec(), boundValue(), boundValues() */ void QSqlQuery::bindValue(const QString& placeholder, const QVariant& val, diff --git a/src/sql/kernel/qsqlresult.cpp b/src/sql/kernel/qsqlresult.cpp index 09b8f8d889..f933e6eeb1 100644 --- a/src/sql/kernel/qsqlresult.cpp +++ b/src/sql/kernel/qsqlresult.cpp @@ -704,12 +704,6 @@ void QSqlResult::bindValue(int index, const QVariant& val, QSql::ParamType param Binds the value \a val of parameter type \a paramType to the \a placeholder name in the current record (row). - Values cannot be bound to multiple locations in the query, eg: - \code - INSERT INTO testtable (id, name, samename) VALUES (:id, :name, :name) - \endcode - Binding to name will bind to the first :name, but not the second. - \note Binding an undefined placeholder will result in undefined behavior. \sa QSqlQuery::bindValue() |