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 🕺
I completely revisited QTime, practically everything was touched as
prepared bindings, result sets, serialization, appends, casting.
- added many new QTime related tests
- added a new columns to migrations
- updated seeder
- added a new u_timeFormat data member for models
- updated docs about u_timeFormat
- added a new tst_Blobs functional test case that inserts
binary()/text() and mediumBinary()/mediumText()
- updated schema builder unit tests, added all supported binary types
- updated migrations
- added Lorem ipsum paragraphs generator
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
The Model::u_dateFormat now also accepts 'U' for unix timestamps.
The database column type should be qint64 or int.
- added extensive unit tests also for null values, for getAttribute()
and also for setAttribute()
- updated migrations, added a new added_on unix timestamp column
to the Role model
- updated database seeders
- updated docs
In addition to actually removing records from your database, TinyORM
can also "soft delete" models. When models are soft deleted, they are
not actually removed from your database. Instead, a deleted_at attribute
is set on the model indicating the date and time at which the model was
"deleted".
- added docs
- added all proxies
- added complete functional tests and a few unit tests
- carefully verified all possible scenarios because it changes
practically all queries 🤯
Others:
- also added from() to all proxies
- bugfix in seeders, bad ID in the PostgreSQL primary key (sequence)
- added fixPostgresSequences() to our tom seeder
- added PostgreSQL connection to tom_testdata
- updated msvc workflow
- tom, throw if empty connection only if exactly one connection
provided
- also updated create_and_seed_database.php script to exclude postgres
connection using --skip-postgres-migrate command-line parameter
- initial g++/clang build, ctest on MSYS2 UCRT64 on Windows Server 2022
- initial cmake build/ctest on Ubuntu 20.40
- initial cmake build/ctest on MSVC on Windows Server 2019
changed driver to QPSQL in tst_databasemanager
This avoids crash when QMYSQL driver's dll is unavailable.
QMYSQL driver is not shipped by default by Qt Windows MSVC installer.
When env. variables for some connection was not defined then do not
create/seed database for this connection.
- connection to the database eagerly, before seeding starts