Commit Graph

387 Commits

Author SHA1 Message Date
silverqx 109ed60913 added qmake ccache support on Windows
The ccache can be enable using the "CONFIG*=tiny_ccache" feature.

 - updated docs
2022-07-13 13:56:23 +02:00
silverqx 6f752c358f added Model::increment()/decrement()
- added also tests
 - added default template parameter value std::size_t
 - new method HasAttributes::syncOriginalAttributes()
2022-07-11 19:41:57 +02:00
silverqx 95b1473ba7 fixtypo 2022-07-11 19:39:40 +02:00
silverqx 330cb72ee1 return -1 for affecting statements if pretending 2022-07-11 19:03:24 +02:00
silverqx 576001f0e8 fixtypo and whitespaces 2022-07-11 18:54:04 +02:00
silverqx 9162c5a53d used shared_ptr everywhere
Get rid of the QSharedPointer and use the std::shared_ptr everywhere.
2022-07-10 17:36:53 +02:00
silverqx cca1305054 shell complete, rename shell:connection tag 2022-07-09 06:24:45 +02:00
silverqx 9f28895ec6 removed unnecessary include 2022-07-08 11:07:17 +02:00
silverqx 6f70f930c2 fixtypo
[skip ci]
2022-06-27 02:15:23 +02:00
silverqx a30dfcd364 removed deprecated tag
[skip ci]
2022-06-27 02:01:05 +02:00
silverqx de2c642a7e tests enhanced connections handling
If DB driver for any connection is not available then skip all tests
for this connection.

 - also added DB::drivers()/isDriverAvailable()/...
2022-06-24 15:01:16 +02:00
silverqx 8898b5e163 bugfix missing include 2022-06-24 14:59:41 +02:00
silverqx 5cbea87321 added elapsed timer to php create/seed db script
[skip ci]
2022-06-23 11:02:18 +02:00
silverqx 9413daf99f workflows added tom SQLite migrations
- also removed php migrations from all workflows 🙌🥳
2022-06-21 08:35:55 +02:00
silverqx 9905aaa1b1 bugfix create tmp/ folder for sqlitegrammar test 2022-06-20 19:36:37 +02:00
silverqx 70ce573c3f added SQLite schema builder 💥
- changed return value for
   SchemaBuilder::createDatabase()/dropDatabaseIfExists() to
   std::optional<QSqlQuery>
 - added 46 SQLite schema builder tests
2022-06-20 19:05:01 +02:00
silverqx 2410a8b2cb code formatting 2022-06-20 17:40:34 +02:00
silverqx f0a985ca6b added zsh completion 🤯🚀 2022-06-15 15:40:30 +02:00
silverqx c6f06d6280 bugfix disable testdata_tom if tom disabled 2022-06-08 15:58:10 +02:00
silverqx 9f5926f1ee bump version to TinyUtils v0.2.0 2022-06-07 11:26:06 +02:00
silverqx db5232a22f bump TinyORM v0.4.5, tom v0.2.2, TinyUtils v0.1.1 2022-06-05 13:43:49 +02:00
silverqx 1d24bf1cea fixed unused variable warning in static build 2022-06-04 16:28:12 +02:00
silverqx 43335a6ca4 updated conf.pri.example/s
[skip ci]
2022-06-04 15:10:52 +02:00
silverqx 4b203f8fac workaround qmake bug moc_predefs.h with clang-cl
[skip ci]
2022-06-04 15:10:52 +02:00
silverqx 4f1c931eae added support for clang-cl
Be able to build with clang-cl with MSVC 2019/2022 but only with
inline constants.

 - supported by both CMake and qmake 🎉
 - updated docs support compilers

qmake specific:

 - enhanced and fixed tiny_toolchain_requirement
 - added clang-cl min. required version to tiny_toolchain_requirement
 - enhanced winconf.pri
 - updated conf.pri.examples
 - added a new feature file the tiny_system_headers.prf, it unifies
   tagging system headers

cmake specific:

 - also added clang-cl min. required version as minReqClangClVersion
 - for clang-cl set the INLINE_CONSTANTS to ON and don't show this
   CMake option
2022-06-04 09:23:53 +02:00
silverqx 9b67c98cec qmake variable renamed to TINY_BUILD_SUBFOLDER
[skip ci]
2022-06-02 17:00:16 +02:00
silverqx de38d4213f renamed c macro to TINYORM_USING_PCH
- also added this macro to docs
2022-06-01 21:04:09 +02:00
silverqx bf27133ffc enhanced escaping of special characters
Enhanced escaping of special characters in the schema builder.

 - added note to the docs
 - added unit tests
2022-06-01 19:17:43 +02:00
silverqx 1cf67bc49d updated comment
[skip ci]
2022-05-26 09:51:51 +02:00
silverqx 70a62730bb updated comment
[skip ci]
2022-05-25 19:06:33 +02:00
silverqx 2d3bfb0083 renamed dotenv example files
[skip ci]
2022-05-25 13:58:58 +02:00
silverqx b781b78e35 bugfix © in RC file for msvc Qt6 🤬 2022-05-25 11:47:53 +02:00
silverqx b623f208c1 used Q_SLOTS 2022-05-24 23:31:33 +02:00
silverqx 209c0bb6fa clazy enabled no-ctor-missing-parent-argument
Enabled no-ctor-missing-parent-argument clazy check.
2022-05-24 20:22:19 +02:00
silverqx 2cb8bb9b4b use tom migrations in unit tests for PostgreSQL 💪
- 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
2022-05-23 16:11:30 +02:00
silverqx 0bcbcd2431 added support for PostgreSQL schema builder 🎉👌
- added a new config. option dont_drop, allows to define table that
   will be excluded during dropAllTables(), has a default value
   spatial_ref_sys for PostGIS
 - implemented fluent commands, used only by the PostgreSQL Comment
   command
 - added tests for PostgreSQL schema builder
 - reworked tst_Migrate to be able to run on all supported connections,
   currently PostgreSQL and MySQL
 - updated docs

Unrelated:

 - added a new reference class IndexDefinitionReference for a nice API
   during index definition, contains algorithm and language
 - unified selectFromWriteConnection() in schema builders
2022-05-23 10:14:25 +02:00
silverqx 767b369148 removed unnecessary autoIncrement() call 2022-05-23 09:14:47 +02:00
silverqx 3303e5582a updated comment 2022-05-23 09:14:04 +02:00
silverqx 82cf2ea7c0 don't include models if disable_orm 2022-05-23 08:25:37 +02:00
silverqx 74e8078897 added todo task 2022-05-18 14:14:39 +02:00
silverqx 54e3613a98 added a new TZ00 string constant
- used everywhere
 - updated docs
2022-05-18 09:57:06 +02:00
silverqx 488037b33a used our seeder in workflows 🎉💪 2022-05-18 09:40:45 +02:00
silverqx bce94ade1f enhanced TinyUtils library
- whitespaces
 - exception messages
 - used EMPTY constant
2022-05-18 09:23:15 +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 5524407a23 whitespaces 2022-05-17 17:10:31 +02:00
silverqx 8471ea6608 removed public specifier from seeders 2022-05-17 13:41:43 +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 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