These methods had a wrong names after the TinyDrivers were added as
all can return QSqlXyz or Orm::Drivers::SqlXyz instances.
Changing Qt to Sql covers both cases.
- updated auto tests
- updated docs
Auto tests don't fail if the tom example migrations are migrated, they
will be rolled back and the migrations_example migration repository
table will be uninstalled.
This is a very rare edge case, but it can still happen during local
development, auto test are more robust 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
The databasemanager test case that will provide PCH for all other test
cases, what means all other test cases will use this PCH without
compilation.
- added a new PROVIDES_PCH for tiny_configure_test()
- this new implementation will be enabled from Qt v6.8.0 because of
https://bugreports.qt.io/projects/QTBUG/issues/QTBUG-126729
The qmake doesn't support reuse of already compiled PCH, what means
PCH-s are compiled for each test case, which is much slower ~10s.
I would have to manage the PCH compilation flags myself to make PCH
reuse possible.
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)
Divided to 5 commits for simpler review.
Fifth commit:
- renamed toVector() methods
- updated all comments
- also renamed toVectorVariantList() to toListVariantList() and
attributesToVector() to attributesToList()
These methods must be renamed, they must be toList() because in the
future there can be toVector() method that will convert to
std::vector<>.
Also, all symbols described below which contain the word [Vv]ector will
not be renamed to [Ll]ist, the reason for this is that the QList<> is
vector and in the future when the QtCore dependency will be dropped 😮
this will be the std::vector<>. 😎
- variable names that are of type QList<>
- method names which are operating on the QList<>
- comments like: Vector of attached models IDs.
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.
- for Qt <6 disabled deprecated APIs for Qt <=6.0
- added temporary workaround for
QVERIFY_EXCEPTION_THROWN() vs QVERIFY_THROWS_EXCEPTION(), to support
Qt v6.8 and also older version at the same time