Commit Graph

229 Commits

Author SHA1 Message Date
silverqx f043f05953 drivers fixed Clang Tidy warnings 2024-07-30 16:52:27 +02:00
silverqx 2519c193ed fixed Clazy warnings 2024-07-30 14:03:44 +02:00
silverqx 571639892d drivers bugfix removed noexcept specifier 2024-07-30 00:22:33 +02:00
silverqx 3a14b13367 fixed Clang Tidy warnings 2024-07-29 23:39:39 +02:00
silverqx 1e4b0bce79 drivers mysql bugfix loadable MySQL driver 2024-07-29 14:49:47 +02:00
silverqx a9e6ef9a56 drivers added todo task 2024-07-29 13:48:32 +02:00
silverqx e833caa106 removed elaborated friend declarations
Used forward declarations declared before instead.

It looks like the elaborated friend declarations will be dropped
from the C++26.
2024-07-28 17:51:22 +02:00
silverqx 2b7976bd30 drivers updated comment 2024-07-28 12:53:09 +02:00
silverqx 840dbf2071 drivers added SqlQuery::isEmpty()
- used in some test methods
 - extracted throw an exception logic
2024-07-28 12:52:55 +02:00
silverqx 5154bc945b drivers added/updated comment 2024-07-28 09:13:51 +02:00
silverqx 656895eb1e drivers fixtypo 2024-07-28 00:34:48 +02:00
silverqx fbafb316f1 drivers removed const_cast<>
This is possible after the std::enable_shared_from_this<MySqlDriver> was
added.
2024-07-28 00:34:47 +02:00
silverqx 88b8286e35 drivers removed driverWeakInternal()
This is possible after the std::enable_shared_from_this<MySqlDriver> was
added.
2024-07-28 00:34:45 +02:00
silverqx 3518d9f316 drivers get rid of passing weak_ptr<SqlDriver> 🙌
Used the std::enable_shared_from_this<MySqlDriver> base class to avoid
passing the weak_ptr<SqlDriver> all around. It greatly simplified
the code and also the logic is more correct.

It also allowed to remove the SqlDatabase::driverWeak() non-const
version which was dedicated exactly for this, to be able to pass it
to methods that needed it, no more needed now.
2024-07-28 00:32:39 +02:00
silverqx f9cdaba8ba drivers added IWYU pragma 2024-07-27 21:12:39 +02:00
silverqx eba49776c1 drivers optimized cleanup before query execution
Don't cleanup on the newly created instance.
2024-07-26 21:51:05 +02:00
silverqx 525214e66e drivers bugfix withDefaultValues to false
Changed the Default Column Values default argument value to false
because Qt API doesn't obtain these Defaul Column Values
in the QSqlQuery::record(), I didn't realize that.

 - updated functional tests
2024-07-23 21:40:43 +02:00
silverqx 8df1d77999 drivers updated comment 2024-07-21 20:29:54 +02:00
silverqx 3d599fc501 drivers bugfix different parameter name decl./def. 2024-07-21 20:03:33 +02:00
silverqx c5e9b86459 drivers renamed parameter 2024-07-21 20:03:16 +02:00
silverqx 7ec904de76 removed useless #include-s 2024-07-21 12:54:40 +02:00
silverqx af9e405954 unified constructor comments 2024-07-21 12:54:39 +02:00
silverqx 6a59f334f9 fixtypo 2024-07-21 12:54:38 +02:00
silverqx c4430453e6 drivers added SqlDatabase::record(tableName)
It allows to obtain a SqlRecord for the given table.

Populating the Default Column Values works the same way as
for the SqlQuery/SqlResult couterparts.

The recordCached() counterparts in SqlResult were not implemented
because of cache invalidation problems (not possible with the current
API, it's hard to implement).

This API always select-s all columns from the information_schema.columns
table, that's why the SqlResult::recordWithDefaultValues(allColumns)
has the allColumns parameter, it's used but this API/feature.

 - added functional tests
 - added a new empty_with_default_values table
 - logic that doesn't fit into the MySqlDriver class was extracted
   to the SelectsAllColumnsWithLimit0 concern 🕺
2024-07-20 19:58:54 +02:00
silverqx 49de8b62c2 drivers added databaseName() 2024-07-20 19:50:11 +02:00
silverqx 59002ddbb2 drivers added section comment 2024-07-20 19:50:10 +02:00
silverqx 063d725340 drivers updated comment 2024-07-20 19:50:09 +02:00
silverqx 90a5a76ecf drivers populate Default Column Values
Populate the Default Column Values during SqlQuery::record() method
call. I was able to preserve the recordCached().
The withDefaultValues = true was added for both methods, the default
must be true to be API compatible with Qt, I would prefer false
otherwise. 😞

 - enhanced tst_SqlQuery_Normal/Prepared record() related tests
   (exhaustive testing of the SqlRecord)
2024-07-20 19:50:05 +02:00
silverqx 36d2f694e5 drivers updated comments 2024-07-20 18:42:01 +02:00
silverqx 97e0c2892e drivers added SqlRecord::fieldNames() 2024-07-20 18:42:01 +02:00
silverqx 270b75bf8d drivers added SqlField::isNullColumn() 2024-07-20 18:42:01 +02:00
silverqx d29050293a drivers extracted SqlRecord cache to own class
- added a nice API
2024-07-20 18:42:01 +02:00
silverqx c90c5c1298 drivers moved databaseName up 2024-07-20 18:42:01 +02:00
silverqx a836f35f4a drivers mysql added escapeIdentifier()
- also added DOT constant
2024-07-20 18:42:00 +02:00
silverqx 0e2a038291 driver moved definition down 2024-07-14 14:59:04 +02:00
silverqx ce6ed5a15b drivers mysql reordered method 2024-07-14 12:33:34 +02:00
silverqx 8a60adca8a drivers renamed method 2024-07-12 12:05:04 +02:00
silverqx 9ae5928806 drivers fixtypo in method name 2024-07-12 12:04:12 +02:00
silverqx 1607c834f7 drivers removed useless symbol exports
These headers are private so symbol exports are not needed.
2024-07-03 17:24:36 +02:00
silverqx afe299e6b0 upgraded to MySQL v9.0
- workflows, tools, docs, qmake, CMake, ...
2024-07-03 16:52:11 +02:00
silverqx d5819e2797 drivers updated comment 2024-07-03 16:34:49 +02:00
silverqx 33b690738f bugfix clang-cl extern/inline constants
I forgot to change code also in config_p.hpp.
2024-07-03 10:08:12 +02:00
silverqx 74bb99f233 renamed to QList<QVariant> to follow code style 2024-07-02 18:06:15 +02:00
silverqx 9623bbce47 cmake renamed to minReqQtVersion
Renamed CMake variable for minimum required Qt version
to minReqQtVersion (v6.2 is minimum).
2024-06-30 13:16:35 +02:00
silverqx 3ba13970d7 get rid of Helpers::qVariantTypeId()
Not needed anymore after Qt v5.15 support removed.

 - also removed PROJECT_TINYDRIVERS_PRIVATE compile definition, not
   needed anymore as well
2024-06-30 12:41:58 +02:00
silverqx eda9df9f9e removed Qt v5 support since TinyORM v0.38.0 🎉🕺🙌
Removed Qt v5.15 support since TinyORM v0.38.0, finally.

Minimum required Qt version is now v6.2!

Day of celebration is today. 😁

 - removed all #if QT_VERSION macro checks
 - updated docs
 - workflows removed Qt v5 related pipelines
 - updated all comments
 - vcpkg removed tinyorm-qt5 port
 - updated Gentoo build
 - updated README.md Qt v5 badges
 - tools removed Qt v5 related scripts
 - tools updated deploy.ps1 script
2024-06-28 14:57:59 +02:00
silverqx e24064b7fd qmake moved all feature to private/ folder
Moved all features which aren't used through CONFIG+=xyz and are loaded
using the load(private/xyz) function to the qmake/features/private/
folder.

Currently, the qmake/features/ folder contains only features which
should be used using the CONFIG+= qmake variable.
2024-06-25 13:44:52 +02:00
silverqx 31b8e06a9c fixtypo compiler names
Everywhere cmake, qmake, docs, ...
2024-06-25 12:13:10 +02:00
silverqx 20f4e02e4b added _VERSION_HEX and _VERSION_CHECK() C macros
Added to all version.hpp files for all project.

Eg. TINYORM_VERSION_HEX and TINYORM_VERSION_CHECK().

They can be used for version comparison like:
 - #if TINYORM_VERSION_HEX >= TINYORM_VERSION_CHECK(0, 37, 3)
2024-06-19 11:48:40 +02:00
silverqx 0301a52799 removed qt_windows.h from PCH 😬 2024-06-15 14:44:12 +02:00