diff options
| author | Andreas Bacher <andreas.bacher@meon-medical.com> | 2023-03-14 11:25:20 +0100 |
|---|---|---|
| committer | Andreas Bacher <andreas.bacher@meon-medical.com> | 2023-03-24 23:43:54 +0100 |
| commit | 5af57389807d0b51509d55e1f87042cab393da6e (patch) | |
| tree | 296d45d53137a97c616c0a20966e04086cda3325 /tests/auto/sql/kernel/qsqldatabase | |
| parent | 8faf2511da2f425bb044317b5c37c39d27c0a6db (diff) | |
SQL/IBASE: Time Zone support (firebird 4.x)
Add support for time zones in the IBASE driver, which was introduced in
firebird 4.x. TIMESTAMP WITH TIME ZONE data type is supported in order
to store and retrieve a QDateTime with the time zone.
Task-number: QTBUG-111879
Change-Id: I631b4262d17796a17630379b7d659f88244a23ad
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Diffstat (limited to 'tests/auto/sql/kernel/qsqldatabase')
| -rw-r--r-- | tests/auto/sql/kernel/qsqldatabase/tst_databases.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/auto/sql/kernel/qsqldatabase/tst_databases.h b/tests/auto/sql/kernel/qsqldatabase/tst_databases.h index c715c1c2a82..c62f6a97ff4 100644 --- a/tests/auto/sql/kernel/qsqldatabase/tst_databases.h +++ b/tests/auto/sql/kernel/qsqldatabase/tst_databases.h @@ -9,6 +9,7 @@ #include <QSqlDriver> #include <QSqlError> #include <QSqlQuery> +#include <QSqlRecord> #include <QRegularExpression> #include <QRegularExpressionMatch> #include <QDir> @@ -20,9 +21,12 @@ #include <QJsonObject> #include <QJsonDocument> #include <QSysInfo> +#include <QVersionNumber> #include <QtSql/private/qsqldriver_p.h> #include <QTest> +using namespace Qt::StringLiterals; + #define CHECK_DATABASE( db ) \ if ( !db.isValid() ) { qFatal( "db is Invalid" ); } @@ -434,6 +438,15 @@ public: return ver; } + static QVersionNumber getIbaseEngineVersion(const QSqlDatabase &db) + { + auto q = db.exec("SELECT rdb$get_context('SYSTEM', 'ENGINE_VERSION') as version from rdb$database;"_L1); + q.next(); + auto record = q.record(); + auto version = QVersionNumber::fromString(record.value(0).toString()); + return version; + } + QStringList dbNames; int counter = 0; |
