From ee5573c6fb49d0b496b19d154e2e1c5154ed5a44 Mon Sep 17 00:00:00 2001 From: Christian Ehrlicher Date: Thu, 23 Aug 2018 20:58:31 +0200 Subject: QSqlQuery: Specify documentation of named placeholders Named placeholders can only contain characters in the range of [a-zA-Z0-9_] but this was not documented anywhere. Task-number: QTBUG-69775 Change-Id: I5c4eff7674b1fc04cef60e7d7f44cd87414ffbe9 Reviewed-by: Paul Wicking Reviewed-by: Andy Shaw --- src/sql/kernel/qsqlquery.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/sql/kernel/qsqlquery.cpp b/src/sql/kernel/qsqlquery.cpp index 628bfa1880..daadcb8a0e 100644 --- a/src/sql/kernel/qsqlquery.cpp +++ b/src/sql/kernel/qsqlquery.cpp @@ -942,10 +942,12 @@ void QSqlQuery::clear() query. See the \l{QSqlQuery examples}{Detailed Description} for examples. - Portability note: Some databases choose to delay preparing a query + Portability notes: Some databases choose to delay preparing a query until it is executed the first time. In this case, preparing a syntactically wrong query succeeds, but every consecutive exec() will fail. + When the database does not support named placeholders directly, + the placeholder can only contain characters in the range [a-zA-Z0-9_]. For SQLite, the query string can contain only one statement at a time. If more than one statement is given, the function returns \c false. -- cgit v1.2.3