diff options
author | Bill King <bill.king@nokia.com> | 2009-06-22 01:26:29 (GMT) |
---|---|---|
committer | Bill King <bill.king@nokia.com> | 2009-06-22 02:00:48 (GMT) |
commit | 24d0bee8de27fb148a12efa21d973f4c45e216d0 (patch) | |
tree | 701dc82487ca45fabea07c3f3c4a7329093491b5 /src/sql/drivers/odbc/qsql_odbc.cpp | |
parent | fbe1e69584746e6255b6ea6fede9080c96f5d4e2 (diff) | |
download | Qt-24d0bee8de27fb148a12efa21d973f4c45e216d0.zip Qt-24d0bee8de27fb148a12efa21d973f4c45e216d0.tar.gz Qt-24d0bee8de27fb148a12efa21d973f4c45e216d0.tar.bz2 |
Fix the behaviour of sql classes regarding quoted identifiers
If no quotes around identifiers are provided by the programmer,
identifiers are treated identically to how the underlying engine
would behave. i.e. some engines uppercase the identifiers
others lowercase them. If the programmer wants case sensitivty
and/or use whitespaces they will need to quote their identifiers.
The previous (incorrect) behaviour always quoted the identifiers.
Originally committed to 4.5, but removed due to BC concerns, this
is a reintegration into mainline for inclusion in 4.6
Reviewed-by: Bill King
Diffstat (limited to 'src/sql/drivers/odbc/qsql_odbc.cpp')
-rw-r--r-- | src/sql/drivers/odbc/qsql_odbc.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/sql/drivers/odbc/qsql_odbc.cpp b/src/sql/drivers/odbc/qsql_odbc.cpp index 727c5ce..c47e7e5 100644 --- a/src/sql/drivers/odbc/qsql_odbc.cpp +++ b/src/sql/drivers/odbc/qsql_odbc.cpp @@ -598,6 +598,7 @@ QChar QODBCDriverPrivate::quoteChar() const return quote; } + bool QODBCDriverPrivate::setConnectionOptions(const QString& connOpts) { // Set any connection attributes @@ -2441,6 +2442,9 @@ bool QODBCDriver::isIdentifierEscapedImplementation(const QString &identifier, I return identifier.size() > 2 && identifier.startsWith(quote) //left delimited && identifier.endsWith(quote); //right delimited + return true; + else + return false; } QT_END_NAMESPACE |