silverqx
f8509700a3
tests fixtypo
2023-05-19 18:01:52 +02:00
silverqx
a1e9f99d7d
tests used empty() check instead of 0
2023-05-19 14:18:58 +02:00
silverqx
5f4ef345d2
tests bugfix tst_Collection_Xyz::load_xyz()
2023-05-19 14:15:37 +02:00
silverqx
722fb62e2c
tests added QVERIFY(relationLoaded())
2023-05-19 14:12:09 +02:00
silverqx
c0ff36f0d6
updated comment
2023-05-19 11:43:29 +02:00
silverqx
6d6f536e88
tests updated comment
...
[skip ci]
2023-05-19 11:38:23 +02:00
silverqx
d9815e9d5a
tests test polymorphic Relation instances
...
Added the test case which tests returning
the std::unique_ptr<Relation<>> instead of the derived relation
eg. std::unique_ptr<HasMany> from the relationship factory methods.
This behavior is considered an additional feature and is possible
thanks to the polymorphism.
2023-05-19 11:19:00 +02:00
silverqx
df118c33ac
tests whitespaces
2023-05-18 15:50:21 +02:00
silverqx
0b2c435a2f
tests used real types instead of auto
2023-05-17 19:23:49 +02:00
silverqx
ec77eaae32
suppressed clang tidy warning
...
- also formatting
2023-05-17 18:39:07 +02:00
silverqx
5b169a6c41
added ModelsCollection equality operators
...
Also added equality operator overloads which allow comparing:
ModelsCollection<Model> == ModelsCollection<Model *>
ModelsCollection<Model *> == ModelsCollection<Model>
2023-05-17 18:31:47 +02:00
silverqx
c631b97000
fixtypo avoid confusion
2023-05-16 17:59:44 +02:00
silverqx
b37147fecf
tests extracted common code to library class
...
Extracted for tst_collection_models/relations tests
to the TestUtils::Common::Collection.
2023-05-16 15:12:50 +02:00
silverqx
58a197a5ca
tests used Q_GLOBAL_STATIC_WITH_ARGS()
2023-05-16 14:17:16 +02:00
silverqx
49829bc055
added ModelsCollection::load()
...
- also added functional tests
2023-05-16 12:51:38 +02:00
silverqx
75a2171975
tests bugfix missing QVERIFY
2023-05-12 09:23:32 +02:00
silverqx
63533c9e07
tests added test
2023-05-11 13:45:15 +02:00
silverqx
997eeba82c
tests renamed method
2023-05-11 13:40:18 +02:00
silverqx
64d825caa2
used static_cast for QueryUtils::queryResultSize
2023-05-08 15:00:05 +02:00
silverqx
cdd858777d
added Qt5 support for ModelsCollection
2023-05-08 14:09:14 +02:00
silverqx
9e147aa85f
changed paging type to qint64
...
Changed in all paging related methods like chunk(), take(), ...
- updated unit tests
2023-05-08 13:30:02 +02:00
silverqx
98282ab66d
tests used SIZE_ everywhere
...
To avoid collisions with Windows header files.
2023-05-07 17:44:53 +02:00
silverqx
260dab2735
tests renamed local variable
2023-05-07 14:52:42 +02:00
silverqx
9ac6f1bbc5
tests fixed gcc warnings
2023-05-06 15:49:15 +02:00
silverqx
29275a7d33
tests bugfix bad overload selected
2023-05-06 14:49:20 +02:00
silverqx
3374929d26
tests removed unused #include
2023-05-05 14:20:45 +02:00
silverqx
71d6e24e28
used NAME constant everywhere
2023-05-05 14:16:45 +02:00
silverqx
4c9bf9c7e9
added note constant
2023-05-05 14:14:15 +02:00
silverqx
1c538527ef
tests fixed clang warning
2023-05-05 13:56:22 +02:00
silverqx
4808d90121
tests formatting
2023-05-05 13:52:25 +02:00
silverqx
7f344a2145
added ModelsCollection 🔥 🚀 🎉
...
The Orm::Tiny::Types::ModelsCollection is container class with
additional handy methods like pluck(), whereIn(), filter(), ...
It extends the QVector. The template parameter can be the Model or
Model *, the model must be the Derived model type eg. Torrent, Post, ...
All ORM-related methods return the ModelsCollection so it can be easily
filtered, changed, transformed with one simple line or callback.
All the algorithms are nicely encapsulated in the ModelsCollection
methods.
Currently, there is this pattern, all TinyBuilder or Model methods are
returning the ModelsCollection<Derived> and all relation related
methods are returning the ModelsCollection<Derived *>.
- added Album and AlbumImage migrations and seeder data (also PHP)
- added Album and AlbumImage models
- added functional tests for ModelsCollection<Model> and
ModelsCollection<Model *>
- all ModelsCollection methods or algorithms are unit tested
- replaced all occurences of the QVector<Model> and QVector<Model *>
with the ModelsCollection<Model> and ModelsCollection<Model *> 😵💫
- tests added Model::findMany()
- added reserve() on few places
- removed useless #include-s
2023-05-05 13:06:15 +02:00
silverqx
f9fc6ca080
tests formatting
2023-05-03 17:30:57 +02:00
silverqx
1470ef8fbb
tests bugfix missing reference
2023-05-03 17:30:10 +02:00
silverqx
8673113cd7
tests used QVERIFY() instead of Q_ASSERT()
2023-04-04 15:58:19 +02:00
silverqx
dc7c41e3a2
tests bugfix Q_ASSERT() in Release build
2023-04-04 15:57:54 +02:00
silverqx
1e75726881
tests renamed method
2023-04-04 15:33:49 +02:00
silverqx
a15a59fe88
enhanced TinyUtils library
...
Returning reference and shared pointer to the database manager.
2023-04-01 11:03:29 +02:00
silverqx
7d2143c3ee
tests added add/remove connections test
2023-03-29 16:15:09 +02:00
silverqx
daf420e2dc
updated .clang-tidy
2023-03-28 13:21:26 +02:00
silverqx
1737568cfd
tests qmake removed redundant INCLUDEPATH
2023-03-20 14:04:40 +01:00
silverqx
4737145def
tests qmake added $$quote()
2023-03-20 14:04:39 +01:00
silverqx
7cfe84a2e7
tests fixed clang-tidy 16 warning
...
- cppcoreguidelines-avoid-const-or-ref-data-members
2023-03-20 14:04:39 +01:00
silverqx
abc2c9754d
tests suppressed clang-tidy 16 warning
...
The cppcoreguidelines-avoid-do-while inside the QCOMPARE macro.
2023-03-20 14:04:33 +01:00
silverqx
a7fdc0f68e
suppressed clang-tidy 16 warnings
...
- misc-use-anonymous-namespace
2023-03-20 13:06:33 +01:00
silverqx
85da16e525
tests removed unused include
2023-03-15 18:27:18 +01:00
silverqx
2bf7562a91
tests bugfix forgotten using alias
2023-03-15 18:24:29 +01:00
silverqx
c0dd5e132d
added querybuilder.hpp to databasemanager.hpp
...
Added the #include querybuilder.hpp to the databasemanager.hpp so
everything will be ready if the user includes db.hpp.
2023-03-15 18:15:17 +01:00
silverqx
d64b1adf8c
tests added todo task
2023-03-15 15:13:09 +01:00
silverqx
5aa69c88b9
schema added optional column and index keywords
...
For the MySQL schema grammar added:
- optional column keyword for add, change, or modify alter operations
- optional index keyword for fulltext and unique index alter operations
2023-03-15 15:03:27 +01:00
silverqx
326ef2aff2
schema removed primary key index name for MySQL
...
- added tests
2023-03-15 14:10:15 +01:00