summaryrefslogtreecommitdiffstats
path: root/src/sql
Commit message (Collapse)AuthorAgeFilesLines
* Replace win32-g++ with mingw scopeKai Koehne2014-01-172-2/+2
| | | | | | | | Commit 773dd01 introduced a general mingw platform scope, which is cleaner and more flexible than matching the spec name. Change-Id: Ie3a9cb791a83f7c8a51bc4e23069190c452ab521 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* expand tabs and related whitespace fixes in *.{cpp,h,qdoc}Oswald Buddenhagen2014-01-133-4/+4
| | | | | | | | the diff -w for this commit is empty. Started-by: Thiago Macieira <thiago.macieira@intel.com> Change-Id: I77bb84e71c63ce75e0709e5b94bee18e3ce6ab9e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Move struct declaration out of the union to avoid a compiler warning.Marcel Krems2013-12-311-4/+5
| | | | | | | | Clang 3.3+ warns about this being an extension: qsqlerror.h:101: warning: anonymous types declared in an anonymous union are an extension [-Wnested-anon-types] Change-Id: I0350b977ff85558338b3b9db53d3fce7facb7635 Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Remove additional spaces from indentation.Marcel Krems2013-12-311-6/+6
| | | | | Change-Id: I1f76ed4e2eff64dc133a1fd30a8dc5fd5eb4710e Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-12-242-2/+6
|\ | | | | | | Change-Id: I2defae1904154283446b069d151c3ef57302ec7b
| * fix parsing of bound SQL statements for PostgreSQLIsrael Lins Albuquerque2013-12-162-2/+6
| | | | | | | | | | | | | | | | | | PostgreSQL allows bound variables inside square braces. Task-number: QTBUG-34541 Change-Id: I4f069b3f1078d4cdf172fbac9e0d7d23d20d167a Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* | QSqlError: Set error code for psql-driver.Marcel Krems2013-12-201-3/+4
| | | | | | | | | | | | Task-number: QTBUG-142 Change-Id: I4a68da595b7c8869188225958eaa88f789d4c3bf Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* | Enable QSqlError to handle alphanumeric error codes.Marcel Krems2013-12-202-6/+61
| | | | | | | | | | | | | | | | | | | | Some database systems (like PostgreSQL) use alphanumeric error codes. Introduce a new method nativeErrorCode() which replaces number(). If the error code cannot be converted to int, number() will return 0. Task-number: QTBUG-142 Change-Id: Ic7fba841737674b75c0c01c2263f51d2041da497 Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* | Move QSqlError private members into a pimpl class.Marcel Krems2013-12-202-26/+46
| | | | | | | | | | | | | | This allows us to add new members without breaking BC. Change-Id: I59236cd5eeacdcfc490849a18b3bdf70d7a501bf Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-12-054-21/+33
|\| | | | | | | | | | | | | Conflicts: src/sql/drivers/sqlite/qsql_sqlite.cpp Change-Id: Ia7cffd2c99ae3d5eea6b5740683c06e921336dcd
| * Doc: invalid reference to Qt for Linux/X11Nico Vertriest2013-12-031-9/+7
| | | | | | | | | | | | | | Task-number: QTBUG-34749 Change-Id: I8274e41bc4c29650b22bb6ca5da264687aa70e4a Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
| * Clear isOpenError flag on successful open callTobias Koenig2013-12-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | Clear the isOpenError flag in IBase driver if the QIBaseDriver::open() call was successful, otherwise a previous, unsuccessful open() call would block any further QSqlQuery::exec() calls on this database connection. Task-number: QTBUG-13435 Change-Id: Idc64e28cd63805a13f208702ec87dc1bf6b98798 [ChangeLog][QtSql][QIBASE] Fixed the internal state of IBase driver after a failed open call Reviewed-by: Mark Brand <mabrand@mabrand.nl>
| * Support custom port number in IBASE SQL driverTobias Koenig2013-12-011-2/+6
| | | | | | | | | | | | | | | | | | | | Let the IBASE SQL driver use the custom port number that is set via QSqlDatabase::setPort(). Task-number: QTBUG-33345 Change-Id: Ib55b32c8a318d82038d66e8645b416e36dad3edf [ChangeLog][QtSql][QIBASE] Support custom port number Reviewed-by: Mark Brand <mabrand@mabrand.nl>
| * Fix compilation of OCI driverTobias Koenig2013-12-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | Add missing feature enum in switch statement to avoid warning that would lead to compilation error when compiled with -Wall. Task-number: QTBUG-34794 Change-Id: Ia2f70f27ecbb7a7dfc9d36d261103ff49b6c5e4b [ChangeLog][QtSql][QOCI] Fix compilation Reviewed-by: Mark Brand <mabrand@mabrand.nl>
| * Fix evaluation of SQLite driver optionsTobias Koenig2013-12-011-10/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Ensure that the options, which are passed to the SQLite driver, are evaluated in the correct order and do not overwrite each other. According to http://www.sqlite.org/c3ref/open.html the SQLITE_OPEN_READONLY and (SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE) are mutual exclusive, but SQLITE_OPEN_URI can be combined with both of them. Task-number: QTBUG-35186 [ChangeLog][QtSql][QSQLITE] Fixed evaluation of driver options Change-Id: I8e74fe1ce43b9118b15f7b13fc71670bdcd73f68 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* | add mising tag to method documentationMark Brand2013-12-011-1/+1
| | | | | | | | | | Change-Id: Iafd7a268bf3b3be9a06ab1badc23e3db52df9586 Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* | QSqlQuery::isNull string overloadTasuku Suzuki2013-12-012-0/+19
| | | | | | | | | | | | | | | | | | | | Introduce isNull overload to take field name as a parameter. This is corresponding to the commit 7e6e1412348fb8d8df844d821ee80d6d3de69517 Change-Id: I122f79707d26eaa09c2f38dc31aeee1dac7de33b Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* | Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Frederik Gladhorn2013-12-012-1/+16
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-11-292-1/+16
| |\| | | | | | | | | | Change-Id: Ibb342cc5fc55ff9a3f4b3ecbd53936b57bc13e63
| | * Fix sub-second handling in SQLite driverTobias Koenig2013-11-281-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use explicit format string, that contains milliseconds, when converting an QDateTime/QTime to a SQLite field content. Task-number: QTBUG-24200 [ChangeLog][QtSql][QSQLITE] Fix sub-second handling Change-Id: Ib89152b7c3dd780b57a8826beff8b6b118e9d3d6 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
| | * Fix sub-second handling in MySQL driverTobias Koenig2013-11-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As stated in http://dev.mysql.com/doc/refman/5.7/en/c-api-prepared-statement-data-structures.html the content of MYSQL_TIME.second_part field is supposed to be in microseconds not milliseconds. Task-number: QTBUG-31124 [ChangeLog][QtSql][QMYSQL] Fix sub-second handling Change-Id: I5718868029bdedab9508213e800d2dcf3da9be9a Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* | | Allow temporary databases in sqlite driverNicolas Cornu2013-11-302-4/+2
|/ / | | | | | | | | | | | | | | | | http://www3.sqlite.org/inmemorydb.html#temp_db [ChangeLog][QtSql][QSQLITE] Enable creating temporary databases Change-Id: I9972fba5c91eca55cfc5a84f94cff03d19992324 Reviewed-by: Tobias Koenig <tobias.koenig.qnx@kdab.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-11-266-5/+8
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For the conflicts in msvc_nmake.cpp the ifdefs are extended since we need to support windows phone in the target branch while it is not there in the current stable branch (as of Qt 5.2). Conflicts: configure qmake/generators/win32/msvc_nmake.cpp src/3rdparty/angle/src/libEGL/Surface.cpp src/angle/src/common/common.pri src/corelib/global/qglobal.h src/corelib/io/qstandardpaths.cpp src/plugins/platforms/qnx/qqnxintegration.cpp src/plugins/platforms/qnx/qqnxscreeneventhandler.h src/plugins/platforms/xcb/qglxintegration.h src/widgets/kernel/win.pri tests/auto/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp tools/configure/configureapp.cpp Change-Id: I00b579eefebaf61d26ab9b00046d2b5bd5958812
| * Doc: Updated url variable in qdocconf files.Jerome Pasion2013-11-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In 5.2, the HTML output is in a flatter structure and when they are hosted in qt-project.org/doc, the documentation will be found at http://qt-project.org/doc/qt-$QT_VER The url variable is used by projects outside of Qt 5 which need to link to Qt 5 documentation, such as Qt Creator. Task-number: QTBUG-34584 Change-Id: Ifa55fcd9e402b0e184a41e316340e46aeb7101de Reviewed-by: Topi Reiniö <topi.reinio@digia.com> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
| * Doc: Fix broken linksSze Howe Koh2013-11-051-1/+1
| | | | | | | | | | | | | | | | Task-number: QTBUG-33360 Change-Id: Ic944cb2f575c35ebad64852ef5fc44a50ac03571 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
| * Add QSQLITE_OPEN_URI database connection flagTobias Koenig2013-11-042-0/+3
| | | | | | | | | | | | | | | | | | | | This flag enables the URI mode for database names in the SQLite backend. Without this flag, it's not possible to use URIs like 'file:somedb?mode=memory&cache=shared' to create shared, in-memory databases. Change-Id: I2938184dad1f27c7af454385ca305bd4f6ed1a5e Reviewed-by: Mark Brand <mabrand@mabrand.nl>
| * Doc: Fix miscellaneous typosSze Howe Koh2013-10-301-1/+1
| | | | | | | | | | | | Change-Id: Iaf0dd8974c3ad78beffa995c596a76fb3e4cceab Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
| * Fix - psql driver must format qdatetime using isoCristian Tarsoaga2013-10-261-2/+2
| | | | | | | | | | | | | | | | QDateTime must be formatted as ISO8601 specifies, date/month must pe padded with 0 until width is 2 Task-number:QTBUG-33389 Change-Id: If07bcaa976ea3583369da3fd21ce442ee30e8c1f Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Fix a bug in QSqlQuery::isNull documentationTasuku Suzuki2013-10-221-8/+9
|/ | | | | | | | the method returns true if there is not such field. Change-Id: I25db8de4561d3e0604f3e64edc1810140ba4aad2 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Doc: Adding mark-up to boolean default values.Jerome Pasion2013-10-0813-126/+126
| | | | | | | | | | | | | | | | | Default values should have mark-up to denote that they are code. This commit changes: -"property is true" to "property is \c true". -"Returns true" to "Returns \c true". -"property is false" to "property is \c false". -"returns true" to "returns \c true". -"returns false" to "returns \c false". src/3rdparty and non-documentation instances were ignored. Task-number: QTBUG-33360 Change-Id: Ie87eaa57af947caa1230602b61c5c46292a4cf4e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Add two enums that weren't handled in the ibase SQL driverThiago Macieira2013-10-031-0/+4
| | | | | | | | qsql_ibase.cpp:1155:23: error: enumeration value ‘LowPrecisionDouble’ not handled in switch [-Werror=switch] qsql_ibase.cpp:1419:12: error: enumeration value ‘CancelQuery’ not handled in switch [-Werror=switch] Change-Id: I3c6102051cde80c81948f5a64f9addcf7a371136 Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Merge branch 'stable' into devSergio Ahumada2013-09-211-2/+2
|\ | | | | | | Change-Id: I37d85631ab1165ab91457d8880c4da907a9df73b
| * Fix QSqlDriver::handle casting examplesGiuseppe D'Angelo2013-09-171-2/+2
| | | | | | | | | | | | | | | | QVariant::typeName() returns a const char *, so one can't use == to compare it against another string. Change-Id: Id7a4c06a9e4874459609b3749f87d39ed73e8405 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-08-271-1/+1
|\| | | | | | | | | | | | | Conflicts: examples/widgets/doc/src/addressbook-fr.qdoc Change-Id: Id1196e8e0c6445f1616c3f29234c974d809f8e48
| * Construct a valid QTime when creating timestamps for iBase SQL driver.Mitch Curtis2013-08-211-1/+1
| | | | | | | | | | | | | | | | | | 0e62fc73c905d1f476f3c1493db1bde8096ac609 requires this. Task-number: QTBUG-29261 Change-Id: Idd8b630c72d0fd1c255695a8c2c22f9fe32767ee Reviewed-by: John Layt <jlayt@kde.org>
* | Remove use of QFlag in the SQL driversThiago Macieira2013-08-242-23/+23
| | | | | | | | | | | | | | It's not clear why they were added, but they aren't needed anymore. Change-Id: I1d919deefdbd6a71fa255eeac1a8543c33ba390d Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Doc: Setting module pages' \qtvariable.Jerome Pasion2013-08-021-0/+1
| | | | | | | | | | | | | | | | | | Argument to \qtvariable is the QT variable needed for linking to the module. Task-number: QTBUG-32172 Change-Id: I181c0cfaf9529f3aea741cdaee0f20d6cd0e2d2f Reviewed-by: Martin Smith <martin.smith@digia.com>
* | Merge branch 'stable' into devSergio Ahumada2013-07-112-2/+2
|\| | | | | | | | | | | | | | | | | | | Conflicts: qmake/generators/mac/pbuilder_pbx.cpp src/corelib/json/qjsonwriter.cpp src/corelib/kernel/qeventdispatcher_blackberry.cpp src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm Change-Id: I24df576c4cbd18fa51b03122f71e32bb83b9028f
| * fix off-by-one index checkMark Brand2013-07-011-1/+1
| | | | | | | | | | Change-Id: I6d6461eec24895e9aa0e77deccd39210958b7e2c Reviewed-by: Andy Shaw <andy.shaw@digia.com>
| * Fix comma warning found by ICCThiago Macieira2013-07-011-1/+1
| | | | | | | | | | | | | | qsql_psql_p.h(122): warning #271: trailing comma is nonstandard Change-Id: I35e12b2ae0201b8a9905d3505697a9b36a1a79e2 Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* | Doc: Adding navigation configs in the module qdocconf files.Jerome Pasion2013-06-251-0/+3
|/ | | | | | | | -The navigation bar requires the titles of the landing page and relevant pages. Change-Id: I5d5986b2bf74205cd49957b63fd6ac4e32cbb36b Reviewed-by: Martin Smith <martin.smith@digia.com>
* Improve support for <MODULE>_PATH optionsMatt Fischer2013-05-101-7/+2
| | | | | | | | | | | | | | | | | | | | | | Several modules, including DBus, MySQL, and OpenSSL have configure options of the form <MODULE>_PATH, which is used on Windows (where pkg-config is not present) to specify the locations of third-party libraries. These switches had been implemented by adding extra variables which were referenced in .pro files, to add the appropriate compiler and linker switches. This is undesirable because it means there are two independent paths for adding the switches to the build, which can get out of sync with each other, and indeed this had happened for some of the DBus tools. To remedy the situation, all three of the switches were reworked so that they added values directly to the principal variables that are used in the project files. This reduces maintenance, by ensuring that the pkg-config and non-pkg-config paths appear the same to the rest of the build system. Change-Id: Iae342f1d14b79fbcfef9fe38aadc803ad3141799 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Doc: Removed pages from "qt-sql" group.Jerome Pasion2013-05-073-10/+0
| | | | | | | | | | | -"qt-sql" removed in qtdoc -no longer needed because "Data Storage" and Qt SQL pages already serve as the main introduction to SQL support in Qt Change-Id: I7384ae04ab4c09ecc9d76668e4e7f836095066c1 Reviewed-by: Topi Reiniö <topi.reinio@digia.com> Reviewed-by: Martin Smith <martin.smith@digia.com> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
* Enable bundling Qt in Android package in build systemEskil Abrahamsen Blomfeldt2013-05-011-0/+3
| | | | | | | | | | | | | | | | | | | | | For bundling Qt, we need two things: 1. We need to build a regular .jar file out of the Java files, so that they can be built into the app package. Dexing the classes first (i.e. compiling the JVM bytecode to Dalvik bytecode) is required for loading the .jar file at run-time, but cannot be used for building it into the app, so we need two different paths. 2. We need to specify which extra files have to be bundled for each module (this is primarily for plugins and imports). This is because there is no static dependency on these files, so it cannot be detected during deployment. Task-number: QTBUG-30751 Change-Id: I733603ee5d1c64bd7c5b9357eb5d993b9d0298f7 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Doc: Give C++ class lists consistent titlesSze Howe Koh2013-04-292-3/+3
| | | | | | | | | | | | | The majority format is "<Qt Module> C++ Classes" (see http://qt-project.org/doc/qt-5.0/qtdoc/modules-cpp.html) Also, fix a broken link (Qt Network C++ Classes) "<Qt Module> C++ API" is perhaps the more correct format, but that's part of a much bigger cleanup: QTBUG-30556 Change-Id: I753365e2bec8d85d9a5f686b4aa35c9eeeaf0871 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* qsql_odbc: fix SQLGetStmtAtt usageMark Brand2013-04-241-7/+5
| | | | | | | | | | | | | | | | | | | Failure to initialize the variable can cause spurious non-zero values. http://msdn.microsoft.com/en-us/library/windows/desktop/ms715438(v=vs.85).aspx "..value can either be a SQLULEN value or a null-terminated character string. If the value is a SQLULEN value, some drivers may only write the lower 32-bit or 16-bit of a buffer and leave the higher-order bit unchanged. Therefore, applications should use a buffer of SQLULEN and initialize the value to 0 before calling this function. Also, the BufferLength and StringLengthPtr arguments are not used." Follow-up to 1509316a37fb2d365230d020d1dfc251c830fd56 Change-Id: I2e92eb845a2590bea0849c52bde8902adff1b419 Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* Use Q_DECLARE_PRIVATE for Oracle and DB2 pluginsAndy Shaw2013-04-094-12/+31
| | | | | | | | | This completes the change started with 0bdc86d9ef7be8e27598d245c6ca8026f08aff12 by providing the implementation for the Oracle and DB2 sqldrivers Change-Id: Ia14415c6d7dea51f1369a81236f79aff892b3af7 Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* QSQLITE2Driver: use Q_DECLARE_PUBLIC/Q_DECLARE_PRIVATEMark Brand2013-04-082-11/+15
| | | | | | | Follow-up to 0bdc86d9ef7be8 Change-Id: I0a480b5780eb22b1c22e8a47b3a13ab1cd97b934 Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* QTDSDriver: fix index out of rangeMark Brand2013-04-041-1/+1
| | | | | | | | Follow-up to 5544208e2. Change-Id: Iba3ff291622533e8050ddc0494e4488233727ebe Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QSqlDriver: use Q_DECLARE_PUBLIC/Q_DECLARE_PRIVATEMark Brand2013-04-0415-106/+154
| | | | | | | | | | | | | | | | | | | | | | | | | | 406c8ef6e67da introduced deriving the private SQL driver classes from QSqlDriverPrivate. However, the drivers continued to keep their own pointer to the private class, even though QObject provides the same pointer. Worse yet, the private class is allocated too late and not even passed to QSqlDriver. The result is that QSqlDriver allocates a separate instance of QSqlDriverPrivate. This is likely to cause all kinds of chaos. The private class needs to be allocated in time pass it to QSqlDriver which passes it on to QObject. This commit covers the the base class and drivers: ibase mysql odbc psql sqlite tds Fixes for the remaining drivers will follow. Change-Id: Id8e7ec4205b0ca6cd00bd022c9cd24f137089245 Reviewed-by: Andy Shaw <andy.shaw@digia.com>