Commit Graph

1162 Commits

Author SHA1 Message Date
silverqx 8b9d7f4450 fixtypo 2022-05-18 09:23:15 +02:00
silverqx bce94ade1f enhanced TinyUtils library
- whitespaces
 - exception messages
 - used EMPTY constant
2022-05-18 09:23:15 +02:00
silverqx 0ad5d3e485 added new multi-insert overload to query builder
- also added all proxies
 - updated documentation
2022-05-18 09:23:09 +02:00
silverqx eb638704dc whitespace 2022-05-18 09:01:41 +02:00
silverqx 158f833293 updated error message 2022-05-18 09:01:23 +02:00
silverqx 28067cc10f whitespace 2022-05-17 17:15:05 +02:00
silverqx 0e86a09ea9 bugfix docs bad insert overload 2022-05-17 17:11:12 +02:00
silverqx 5524407a23 whitespaces 2022-05-17 17:10:31 +02:00
silverqx 90fdb71dd3 fixed clang-tidy warning 2022-05-17 16:49:57 +02:00
silverqx ec4775d82d removed unused constant 2022-05-17 16:19:41 +02:00
silverqx 2df4a9781f moved table guesser to the support folder 2022-05-17 16:18:27 +02:00
silverqx 13f1e30cc4 cmake added seeding support
- added TOM_SEEDERS_DIR option
2022-05-17 16:05:53 +02:00
silverqx 49d7b71dcb bugfix forgotten .cpp files 2022-05-17 16:04:59 +02:00
silverqx b0b20e6493 docs use make:seeder to generate seeders 2022-05-17 15:17:34 +02:00
silverqx ca93cd31a0 small updates of migrations and seeding 2022-05-17 15:16:47 +02:00
silverqx b8ad1c0bf0 moved Migration/SeederCreator to Support folder 2022-05-17 15:00:17 +02:00
silverqx bb731e1c22 added make:seeder command 👌
This command is very similar to the make:migration command except
the --create and --table command-line parameters. It provides the same
functionality but for seeders.

 - updated docs TINYTOM_SEEDERS_DIR macro and TOM_SEEDERS_DIR for cmake
2022-05-17 14:50:20 +02:00
silverqx 9ecc787ca4 made methods static 2022-05-17 14:30:16 +02:00
silverqx 65b13758b5 made throwIf method private 2022-05-17 13:44:23 +02:00
silverqx 926d72336f removed unused method 2022-05-17 13:44:03 +02:00
silverqx 74f356dbff removed todo task 2022-05-17 13:42:52 +02:00
silverqx 8471ea6608 removed public specifier from seeders 2022-05-17 13:41:43 +02:00
silverqx 4b08530872 tools merged new changes to run-clazy-standalone 2022-05-17 13:35:34 +02:00
silverqx 337cdb6c5e updated NOTES.txt 2022-05-17 13:30:54 +02:00
silverqx 6f8ab1c057 docs, removed public specifier for seeders 2022-05-17 11:12:24 +02:00
silverqx aee2aac5f9 docs updated seeding description
[skip ci]
2022-05-17 10:39:59 +02:00
silverqx e1722bff1b bump versions TinyORM v0.4.0 and tom v0.2.0 v0.4.0 2022-05-17 10:32:22 +02:00
silverqx 153aac62df docs section about call with additional arguments
[skip ci]
2022-05-17 09:58:09 +02:00
silverqx f7ecb554a4 docs added seeding to Building: Migrations 2022-05-17 09:25:58 +02:00
silverqx cf8f3e651c renamed seeder classes to singular 2022-05-17 08:30:01 +02:00
silverqx 48947bf3d2 added docs for seeding 📃 2022-05-16 21:04:32 +02:00
silverqx 7913a825fa added todo task 2022-05-16 20:11:44 +02:00
silverqx 724f1d7b87 docs added hash tags 2022-05-16 19:55:22 +02:00
silverqx 5932fc9111 fixed clang-tidy warning 2022-05-16 19:54:21 +02:00
silverqx d549db080e whitespace 2022-05-16 19:53:59 +02:00
silverqx b24aa41c46 fixed clang-tidy warning 2022-05-16 19:53:39 +02:00
silverqx 54ce212ed3 enabled seeding in workflows
Enabled tom commands like refresh and migrate with --seed option.
2022-05-16 18:45:38 +02:00
silverqx b336e04752 bugfix missing include 2022-05-16 18:35:27 +02:00
silverqx b0555b34dc bugfix qmake MSYS2 build RC file
Forgot to add the Tom_manifest token.
2022-05-16 18:01:19 +02:00
silverqx 12ec27dd47 fixed clang-tidy warning and missing include 2022-05-16 17:59:41 +02:00
silverqx 96e0f96b38 enhanced Lint-TinyORM, used -j option 2022-05-16 16:13:44 +02:00
silverqx 3cc35b24c9 added missing scripts used in Lint-TinyORM 2022-05-16 15:59:37 +02:00
silverqx 710cdb5358 used decltype() to obtain a type 2022-05-16 14:25:29 +02:00
silverqx d4557fc705 added database seeder 🔥🎉
The db:seed command invokes the root seeder DatabaseSeeder which can
invoke another seeders using the call() related methods. The root seeder
can be set by the --class command-line option and also by the --seeder
cmd. line option on some other commands like migrate:fresh/refresh.

Seeders can be passed to the Tom application in the similar way like the
migrations using the TomApplication::seeders<>() method or through the
constructor.

Arguments can be passed to the call<>() method, then the seeders run()
method will not be called using the virtual dispatch but using the type
traits. Of course the arguments passed to the call<>() method has to
match with the run() method parameters.

Others:

 - unified usingConnection() across all commands, this functionality was
   extracted to own class, previous it was a part of the Migrator class,
   so now every command even if it doesn't use Migrator can call
   the usingConnection() and it correctly sets a default connection and
   SQL queries debugging on the base of the -vvv command-line argument
 - a default database connection is now required, if not set then
   the exception will be thrown
 - added example seeders to the Tom application
2022-05-16 14:25:29 +02:00
silverqx 1b3b431873 extracted Model unguarded to own class
Extracting these guard related methods to own class allows to call
GuardedModel::unguarded() regardless of a template parameters needed
on the Model class, before was needed to call
Model<Torrent, Relations..>::unguarded().

 - also made the g_unguarded atomic
 - bugfix reguard() try-catch-finally in GuardedModel::unguarded()
2022-05-16 14:25:24 +02:00
silverqx ad818845d1 removed duplicate code 2022-05-16 10:28:38 +02:00
silverqx c238e3fd33 made some methods static 2022-05-16 10:27:46 +02:00
silverqx bf44d45573 added commented code 2022-05-16 10:22:26 +02:00
silverqx aa39fc7e76 fixed clang-tidy warning 2022-05-15 22:44:50 +02:00
silverqx ee6f802935 enhanced comment 2022-05-15 22:44:03 +02:00