summaryrefslogtreecommitdiffstats
path: root/src/sql/kernel/qsqldriver.h
Commit message (Collapse)AuthorAgeFilesLines
* QSqlDriver: add Q_PROPERTYChristian Ehrlicher2024-01-191-0/+3
| | | | | | | | | Add Q_PROPERTY to follow the current Qt style and simplify the documentation. Task-number: QTBUG-120566 Change-Id: Ibbafde35bb5600453ed3a3de36b6bf2b5c560e5f Reviewed-by: Kai Köhne <kai.koehne@qt.io>
* QtSql: Stylistic fixes based on the Qt 6.6 api reviewChristian Ehrlicher2023-07-081-1/+1
| | | | | | | | Amends 12909d7c3df74b88382b727cfd3e215914f291ba and 0efd8854c4b32ec0b011efbf6b3a1990fe684e32. Pick-to: 6.6 Change-Id: Id7cb7377bcd1f32092330d2fc5b2fa5b83ce941f Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* A QtSql driver for Mimer SQLFredrik Ålund2023-02-201-1/+2
| | | | | | | | | | | | | | | | | The QtSql for Mimer SQL sqldriver makes it possible to work with the Mimer SQL database on different plattforms. There are drivers for several other databases in QtSql and a driver for Mimer SQL will benefit many users. To build the Mimer SQL driver, download Mimer SQL from https://developer.mimer.com [ChangeLog][QtSql] Added a QtSql plugin to work with the Mimer SQL database Fixes: QTBUG-111219 Change-Id: Id6ba5de4de01189d0516ffbfa89efcb0d013115f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-161-38/+2
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Introduce maximumIdentifierLength to return database limits for namesAndy Shaw2020-08-111-1/+1
| | | | | | | | | Since Interbase/Firebird has a limit for column and table names then this function can be used by QSqlRelationalTableModel to make sure that the aliases created are within that limit. Change-Id: I0cb1c65b34befcb3690ccad3f081556dd2691344 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* SQL: cleanup private classesChristian Ehrlicher2020-01-071-10/+6
| | | | | | | | | | | Cleanup private SQL classes: - use nullptr - use member initialization - adjust style - remove deprecated functions Change-Id: I845f5b1081649fdd40f4f80e1052331806230cf7 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* QSqlDriver: deprecate one-arg notification() signalChristian Ehrlicher2019-09-211-0/+3
| | | | | | | | | | | | | QSqlDriver::notifcation() signal is available in two versions since Qt4 times. They are both emitted in the corresponding places which is useless. Therefore deprecate the one-arg version. [ChangeLog][QtSql][QSqlDriver] The one-arg version of QSqlDriver::notifcation() is now deprecated. Change-Id: Ie09aa0cc952f4d854c6fb617b37b9047a3194ee3 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Replace Q_NULLPTR with nullptr where possibleKevin Funk2017-09-191-2/+2
| | | | | | | | | | | | | Remaining uses of Q_NULLPTR are in: src/corelib/global/qcompilerdetection.h (definition and documentation of Q_NULLPTR) tests/manual/qcursor/qcursorhighdpi/main.cpp (a test executable compilable both under Qt4 and Qt5) Change-Id: If6b074d91486e9b784138f4514f5c6d072acda9a Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Add qtsqlglobal.h and qtsqlglobal_p.hLars Knoll2016-07-031-1/+1
| | | | | | | | | | | | | | The new modular configuration system requires one global header per module, that is included by all other files in this module. QtSql already had such a header, but its name (qsql.h) was not in line with what's being used in all other modules. So add a qtsqlglobal.h header, deprecate qsql.h and turn it into a a forwarding header to that new global header file. Change-Id: Ibaeb95b008cf08ba062cbfe8a3f4d3bf79294390 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Updated license headersJani Heikkinen2016-01-151-14/+20
| | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* QtSql: Use Q_NULLPTR instead of 0 in all public headersMarc Mutz2015-07-081-2/+2
| | | | | | | | | This is in preparation of adding -Wzero-as-null-pointer-constant (or similar) to the headers check. Task-number: QTBUG-45291 Change-Id: Ie14e5280c430b6a254f8f686534450c1e5995374 Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Adjust DBMSType to DbmsType to follow conventionsAlejandro Exojo2014-11-261-3/+3
| | | | | | | | | The enum was made public in f84b00c6d26eb7a3a6802210d2a8b12ddbf815aa, but this makes it follow the convention to camel case acronyms too before it's too late to change it. Change-Id: Ibb81e9221cb73fe0502d0a26f2d73512dd142f08 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Expose QSqlDriverPrivate dbmsType in public QSqlDriver apiMatt Broadstone2014-09-241-0/+14
| | | | | | | | | | dbmsType was previously kept as a private variable in QSqlDriverPrivate, however it's particularly useful for QODBC users. [ChangeLog][QtSql][QSqlDriver] Add support for determining DBMS type from SQL driver. Change-Id: If1c221520da9ac4ccef85a02db078679d76eac92 Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* fix parsing of bound SQL statements for PostgreSQLIsrael Lins Albuquerque2013-12-161-0/+1
| | | | | | | | | PostgreSQL allows bound variables inside square braces. Task-number: QTBUG-34541 Change-Id: I4f069b3f1078d4cdf172fbac9e0d7d23d20d167a Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* QSqlDriver: use Q_DECLARE_PUBLIC/Q_DECLARE_PRIVATEMark Brand2013-04-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Remove QT_{BEGIN,END}_HEADER macro usageSergio Ahumada2013-01-291-4/+0
| | | | | | | | | | | The macro was made empty in ba3dc5f3b56d1fab6fe37fe7ae08096d7dc68bcb and is no longer necessary or used. Discussed-on: http://lists.qt-project.org/pipermail/development/2013-January/009284.html Change-Id: Id2bb2e2cabde059305d4af5f12593344ba30f001 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: hjk <hjk121@nokiamail.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* create interface QSqlDriver::cancelQuery()Sune Vuorela2012-11-201-1/+4
| | | | | | | | | This is useful for canceling a long running sql query. Note that it needs support from the individual drivers. Change-Id: Ia170a70487ff4ee13c85f12bc13e62fb198617fe Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Merge remote-tracking branch 'origin/master' into api_changesOswald Buddenhagen2012-04-101-1/+1
|\ | | | | | | | | | | | | | | | | | | Conflicts: configure src/widgets/styles/qwindowsxpstyle.cpp tests/auto/gui/kernel/qwindow/qwindow.pro tests/auto/gui/kernel/qwindow/tst_qwindow.cpp Change-Id: I624b6d26abce9874c610c04954c1c45bc074bef3
| * Add payload to QSqlDriver notification with PSQL implementation.Matt Newell2012-03-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Postgres async notifications can contain a payload parameter that is currently discarded. This patch provides the QSqlDriver api change necessary to deliver a payload with each emitted notification by adding a QVariant parameter to the notification signal. It also provides the implementation for the qsqlpsql driver. The qsql_ibase driver has been updated to reflect the change to the notification signal signature. The eventNotificationPSQL test in the qsqldatabase test has been expanded to test proper payload sending and receiving. All tests/auto/sql/kernel tests have been run with sqllite and postgres with no regressions. Task-number: QTBUG-13500 Change-Id: I9137f6acc8cfca93f45791ca930e0287d93d5d0d Reviewed-by: Mark Brand <mabrand@mabrand.nl>
| * Fix postgres notification support in the QPSQLDriver.Matt Newell2012-03-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes a critical bug in the qsqlpsql driver where notifications aren't delivered when received. Any blocking libpq function(specifically PQexec) will read all the incoming data from the socket, including any pending notifications. This would cause the socket notifier to never be fired for incoming notifications that are already queued inside libpq. The qsqldriver test case was skipping the postgres notification test because of this bug, now its enabled and passing. In order to fix this bug I made a wrapper function for PQexec in QPSQLDriverPrivate that calls _q_handleNotification via QMetaObject::callMethod QueuedConnection in order to deliver pending notifications when control returns to the event loop. I also added a flag to ensure only one call is made each time the event loop is entered. Change-Id: I19f5297094ae7ae46bfb0717e4fca744d69f7b92 Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* | QSqlDriver functions made virtualMatt Newell2012-04-021-12/+5
|/ | | | | | | | | | | | | | Certain QSqlDriver functions were marked to be made virtual in Qt5. subscribeToNotification, unsubscribeFromNotification, subscribedToNotifications, isIdentifierEscaped, and stripDelimiters. This patch makes them virtual and removes the no longer needed Implementation counterpart functions. It also updates the relevant drivers. This patch has no regressions on the tests in tests/auto/sql/kernel/, tested with sqlite and postgres. Change-Id: Ia2e1c18dfb803531523a456eb4e710031048e594 Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* SQL driver implementation to signal notification sourcesTorben Dannhauer2012-02-011-1/+1
| | | | | | | | | | | Implements the new notification signal in all QSql drivers which use notifcation. In qt5 only ibase and psql have a notification implementation. PSQL differentiates correctly between 'SelfSource' and 'OtherSource' whereas ibase only signals 'UnknownSource' as a default implementation. Change-Id: Ifcaa139b7a980ed852cf817b3f93284609360ca7 Reviewed-by: Torben Dannhauer <torben@dannhauer.info> Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* Interface definition to provide notifications with a source information.Torben Dannhauer2012-02-011-0/+3
| | | | | | | | To differentiate between signals of different sources types, this submission adds an enum and extra signal to provide it. Change-Id: Iad711739c41894e9c74d83072c50ae17edc695f2 Reviewed-by: Torben Dannhauer <torben@dannhauer.info> Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I311e001373776812699d6efc045b5f742890c689 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove use of QT_MODULE from libraryGunnar Sletta2012-01-251-1/+0
| | | | | | | | | | These defines were there to aid in the commercial licensing scheme we used long ago, and are no longer needed. Keep a QT_MODULE(x) define so other modules continue compiling. Change-Id: I8fd76cd5270df8f14aee746b6cf32ebf7c23fec7 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Update contact information in license headers.Jason McDonald2012-01-231-1/+1
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-051-1/+1
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove QT3_SUPPORT from qsql, qxmlGabriel de Dietrich2011-07-061-14/+0
| | | | | | | Change-Id: Iab36ef60de2f0201efa4eb86d8ed5e514d6244fb Reviewed-on: http://codereview.qt.nokia.com/1188 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Update licenseheader text in source files for qtbase Qt moduleJyri Tahtela2011-05-241-17/+17
| | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* Initial import from the monolithic Qt.Qt by Nokia2011-04-271-0/+160
This is the beginning of revision history for this module. If you want to look at revision history older than this, please refer to the Qt Git wiki for how to use Git history grafting. At the time of writing, this wiki is located here: http://qt.gitorious.org/qt/pages/GitIntroductionWithQt If you have already performed the grafting and you don't see any history beyond this commit, try running "git log" with the "--follow" argument. Branched from the monolithic repo, Qt master branch, at commit 896db169ea224deb96c59ce8af800d019de63f12