summaryrefslogtreecommitdiffstats
path: root/src/sql
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.3' into devFrederik Gladhorn2014-07-291-1/+4
|\ | | | | | | | | | | | | Conflicts: src/network/ssl/qsslsocket_openssl_symbols.cpp Change-Id: Ic62419fa1fee5f4de6c372459d72e6e16f9a810b
| * Windows: Add Qt Creator PATH update tip for missing SQL client dllsSamuel Gaist2014-07-221-1/+4
| | | | | | | | | | | | | | | | | | | | | | This patch aims to provide an additional tip for users having trouble with e.g. the MySQL plugin. After a successful build most users are struggling with loading failure due the fact that the client libraries folder is not contained in the PATH environment variable. This tip helps them overcome that in a controlled manner with Qt Creator. Change-Id: I2dc5c9c6d8d8976686d74c369b6e1683c479f35c Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* | Show timing of all executed SQL queriesRobin Burchell2014-07-241-3/+23
| | | | | | | | | | | | | | | | | | This also coincidentally fixes logging of prepared queries, which previously weren't logged. Change-Id: I41b3559080662284699ac3dfa4fa4236342c61d2 Done-by: John Brooks <john.brooks@jollamobile.com> Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* | Doc: Removed "url" variable from qdocconf files.Jerome Pasion2014-07-041-1/+0
|/ | | | | | | | url is set in qtbase/doc/global which is inherited by the Qt 5 module qdocconf files. Change-Id: Ieffa174f598f4a3b8ce8be9bfae7ca9b6981f12b Reviewed-by: Martin Smith <martin.smith@digia.com>
* Remove the use of QT_STATIC_CONST in QtSqlThiago Macieira2014-06-202-2/+11
| | | | | | | | | | | | | | | | | | | | There doesn't seem to be any reason why the macro is actually necessary. My guess is that someone wrote the code on Windows without "const", then it failed to compile everywhere else. Instead of fixing the code by adding the "const", the developer must have added this macro. Microsoft Visual Studio mangles the constness of the variable, so we can't remove it now from existing compilers. But we can for the new version. This is also required to compile QtSql with the MSVC option /Zc:strictStrings, which is enabled in Qt 5.4. Change-Id: Ibf2c2cb7287a4332d69aa81080a37aab4327677d Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Doc: Added link to SQL example page from main Qt SQL landing page.Jerome Pasion2014-06-061-3/+5
| | | | | Change-Id: I1fe42b6ec72933ea8ba605836e8a56332fd3c691 Reviewed-by: Martin Smith <martin.smith@digia.com>
* Initialize the count variable used in SQLNumResultCols to 0Andy Shaw2014-05-272-6/+6
| | | | | | | | | | | If the call to SQLNumResultCols fails for whatever reason then it will not be correctly caught since the count might be higher than 0 since it is uninitalized. This ensures that if it fails then it does not try to act as if it succeeded. Task-number: QTBUG-39137 Change-Id: Ifae8c1f7fac8416643f2317747f87295642a7935 Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Fix for bindvalue(int) memory allocation problemKarim Pinter2014-05-211-1/+3
| | | | | | | | | | QSqlResult::bindValue(int index, ...) is increasing the memory usage when called multiple times for same index Task-number: QTBUG-33169 Change-Id: I4f26125f6bb994bb430dc054df5761b6ddf03075 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2014-05-031-1/+2
|\ | | | | | | | | | | | | Manually fixed up: isES -> isOpenGLES src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp Change-Id: I57d2ef26c3d4a7b40ace09f4e8560b7686650ea5
| * [QtSql][QSqlTableModel] fix failure to refresh in selectRow()Mark Brand2014-04-271-1/+2
| | | | | | | | | | | | | | | | | | | | Caused by missing braces, leaving the break outside the scope of the if clause. Task-number: QTBUG-38509 Change-Id: I6b0a7f34512a3a9b0fbd790116f81f54f4a91cf0 Reviewed-by: Tobias Koenig <tobias.koenig.qnx@kdab.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl> Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* | Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2014-05-012-11/+10
|\| | | | | | | | | | | This merge adds the opengl rename. Change-Id: I84ea0b6abee9780ebb2cf3f64ab9e3fdf2acab3e
| * QSqlError: Mark deprecated functiond with QT_DEPRECATEDOlivier Goffart2014-04-252-11/+10
| | | | | | | | | | | | | | | | | | | | | | And move the default argument from the deprecated constructor to the new one Also make sure that the error number is consistent across the two constructor Change-Id: I3721266b39ab493f0add35b2d1f892b2f6094992 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Fix PSQL column's metadataparihaaraka2014-04-291-5/+26
| | | | | | | | | | | | | | | | | | Fixed libpq's PQfmod() interpretation inside QPSQLResult::record() Task-number: QTBUG-12477 Change-Id: I0e4c94ca1b06fd6a8e5b5702235cdd6d9736f8bf Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* | [QSqlQuery] misbehavior of seek in special query positionsIsrael Lins Albuquerque2014-04-261-7/+18
|/ | | | | | | | | | | | When QSqlQuery::at() == QSql::BeforeFirstRow and seek(1, true) (seek to next record) is called the expected result is go to first row. When QSqlQuery::at() == QSql::AfterLastRow and seek(-1, true) (seek to previous record) is called the expected result is go to last row. But in all cases the first and last are skipped. Change-Id: I584138b3d397ce1c790bf89688ee92289a99611c Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Fix access of tmpStorage in QODBCResult::exec().Friedemann Kleint2014-04-031-25/+20
| | | | | | | | | | | Instead of using a list and appending / popping of elements, use a vector of constant size and access via index to avoid bookkeeping errors. Task-number: QTBUG-37831 Change-Id: Icb5a182626c63e693b04daaf7a2f70997d9aeae1 Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* [QtSql]QIBASE]add support for prepared queries in numRowsAffectedIsrael Lins Albuquerque2014-03-291-2/+12
| | | | | | | Prepared queries need to be handled as procedures. Change-Id: I4b4d7743fe45c416ca83ceb942aa48d79731f2f8 Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Fix some documentation errors.Friedemann Kleint2014-03-241-1/+1
| | | | | | | | Correct links and fix typos, remove obsolete documentation, fix some snippets, mark some classes as internal. Change-Id: I9a3266605f060783413d32740057a57a820c8929 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Fix positional binding values order in QSqlQueryTobias Koenig2014-03-201-4/+9
| | | | | | | | | | | | Adapt the stringification code, that is used to produce the keys for QSqlQuery::boundValues() return value, to keep the right order of the binding values. Task-number: QTBUG-12186 Change-Id: Ic11a455bfd9ffd1418b1b021ce5cf78cae9b4504 [ChangeLog][QtSql] Fixed the order of values with positional binding in a QSqlQuery Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Fix QByteArray memory corruption in QIBaseDriver::open().Friedemann Kleint2014-03-191-20/+15
| | | | | | | | | | Rewrite code to use QByteArray::reserve(), QByteArray::append() instead of memcpy(). Task-number: QTBUG-37508 Change-Id: I16ead153f33fa5a34bc01ee27ae4cd1b8993b65e Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Fix some typosSergio Ahumada2014-03-031-1/+1
| | | | | | Change-Id: I7dbe938bff5ac3ab50a0197f94bdb2f6c22fbd16 Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-02-071-67/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qguiapplication.cpp src/plugins/platforms/android/androidjnimain.cpp src/plugins/platforms/android/qandroidplatformintegration.cpp src/plugins/platforms/android/qandroidplatformintegration.h src/plugins/platforms/android/qandroidplatformopenglcontext.cpp src/plugins/platforms/cocoa/qcocoawindow.h src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/sql/doc/src/sql-driver.qdoc src/widgets/widgets/qtoolbararealayout.cpp Change-Id: Ifd7e58760c3cb6bd8a7d1dd32ef83b7ec190d41e
| * Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2014-01-271-67/+0
| |\ | | | | | | | | | Change-Id: I4680723bef393a15d5aa63b9dd7d5fbb599bd9fa
| | * Doc: Remove section on how build the MySQL driver for MinGW usersKai Koehne2014-01-251-67/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The section is clearly outdated. It references MinGW from mingw.org, which we don't support anymore. With a more modern MinGW you can just use the recipe to link against the prebuilt binaries the same way we do describe for MSVC. Task-number: QTBUG-17268 Change-Id: I15b96fd328605b60d1494a703b9005e2c16aea39 Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* | | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-01-201-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.h src/corelib/tools/qstring.cpp src/gui/image/image.pri src/gui/image/qimage.cpp src/plugins/platforms/cocoa/qcocoawindow.h src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/eglfs/qeglfshooks_stub.cpp tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp Change-Id: I3b9ba029c8f2263b011f204fdf68c3231c6d4ce5
| * | Minor optimization use QString midRef instead of mid.Jędrzej Nowacki2014-01-151-1/+1
| |/ | | | | | | | | | | | | It doesn't create a temporary string. Change-Id: If5c540422f69e573107d1f5a886ac7174ae99853 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | 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>