Commit Graph

236 Commits

Author SHA1 Message Date
silverqx 1c0a478c70 drivers fixtypo 2024-08-11 20:32:37 +02:00
silverqx e2ce873715 drivers added optional access check 2024-08-11 20:32:37 +02:00
silverqx 9c2ff1739f suppressed Clazy warnings 2024-08-09 01:12:06 +02:00
silverqx 0c83c9ebdd drivers fixtypo 2024-08-06 21:01:44 +02:00
silverqx f1b8473092 enhanced NotNull
Use Q_ASSERT_X() for Debug builds.
2024-08-06 21:01:01 +02:00
silverqx b58158e876 revisited all Q_UNREACHABLE() 😰
I have a weird feeling that I will have to return to this again. :/
These unreachable macros scares me. :/
2024-08-06 21:00:56 +02:00
silverqx f9cd6323a8 enhanced NotNull helper 2024-08-02 13:19:44 +02:00
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