- support for querying nested relations existence/absence
- added tests for all possible overloads 😲, 28 unit tests and 14
functional tests
- added has() related proxies to the Model and Relation
- added documentation
- gcc and clang specific fixes
others:
- used clazy exclude comments instead of suppressing warnings in IDE
Two overloads, simple pluck(column) to get values from the given column
and pluck<T>(column, key) which returns std::map<T, QVariant> values
of the given column keyed by the given key.
- added docs
- added tests
- manually tested all proxies
groupBy() methods now take column expressions.
- added all proxies
- added new perfectly forwarded groupBy(&&...args) overload
- all new code tested manually in the TinyOrmPlayground
All the select() related methods can take expressions as column names.
It has an impact on these methods: select, addSelect, get, all, first,
value, firstOrNew, firstOrFailed, find, findOrNew, findOrFailed,
findMany, firstWhere and also pivot columns for the BelongsToMany
relation.
- expressions tests for get, first, value and find, select, addSelect
- bugfix value expression in where and having
- manually tested all the changed methods which don't have auto tests
with normal and expression values, one by one
- made overridden methods in BelongsToMany virtual in Relation class
All column parameters in where methods can take expressions, it's
amazing how it progresses and how everything fits together. 🤔🔥
- added unit tests to test expressions for where methods
Added fromRaw() and fromSub(), I didn't add them to the TinyBuilder,
Model and Relation on purpose.
- added tests for fromRaw() and fromSub()
- fromSub() also supports cross database queries, works on MySQL, but
I also tried on postgres and it didn't work
- tiny expressions are correctly handled in from clause now
Added find, findOrNew, findOrFail, findMany, first, firstOrNew,
firstOrCreate, firstOrFail, firstWhere, firstWhereEq and updateOrCreate.
- proxy methods to the TinyBuilder on the Relation class now return
const Relation & instead of TinyBuilder &
- remove a primary key from attributes used in where() for selecting
row in firstOrCreate()/firstOrNew() methods
- added findOrNew, firstOrNew, firstOrCreate and updateOrCreate
- added findMany to to builders and only to HasMany relation
- added new whereKey/whereNotKey overloads
- also all tests pass, problem was only with bool values and truncate
statement ( can't be send as prepared statement )
- updated migration and seeds, added PostgreSQL connection
- bugfix in migration script ?? vs ?:
- added DatabaseConnection::unprepared()