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.
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
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 🕺
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)
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.
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)