- different render format for options with values --env[=ENV]
- printing a default value part after the description
- added some validations for option names, especially validate the size
- fixed default value name in all commands, it should be upper
Created own tomconstants for the Tom namespace (folder tom/) and used
them everywhere.
Others:
- removed Q_GLOBAL_STATIC_WITH_ARGS() in migrationcreator.cpp and used
getter with the local static const
User can provide a custom migrations path for the make:migration
command.
Default path is at database/migrations relative to the tom example
executable.
This allows to use the tom example as a real migration application and
the user doesn't have to create his own migration project.
Using:
- TomApplication::migrationsPath()
- TINYTOM_MIGRATIONS_PATH preprocessor macro, will be stringified
- TOM_MIGRATIONS_PATH CMake PATH option
Only partial names no matter of case can be passed, eg. mi:st for
the migrate:status, or m for the migrate command.
If the passed name is ambiguous then the error wall with all ambiguous
commands or namespaces is displayed, ambiguous commands also contain
a description.
Following positional arguments support guessing:
- main command name at 0 position
- command name passed to the help command
- namespace name passed to the list command
Commands in the blueprint don't have virtual dtors, they are not
polymorphic, so shared_ptr has to be used because it can correctly
destroy these aggregates.
Commands in the blueprint don't have virtual dtors, they are not
polymorphic, so shared_ptr has to be used because it can correctly
destroy these aggregates.
I had to reject designated initializers with commands because of gcc
throws -Wmissing-field-initializers warning with aggregates that have
a base class even empty base class, so I had to use classic aggregate
initialization with commands, it's not a big deal as all data members
of commands have to be initialized anyway as command aggregate classes
are tailor-made for a particular commands. I didn't want to suppress
this warning around every addCommand() method call.
- mainly default init. of data members
- some shadow/overlapping variable names in lambdas
- missing SHAREDLIB_EXPORT for SchemmaGrammar
Commands was extracted from the ColumnDefinition and has been created
own struct for every or very similar commands. They are now allocated
on the heap to save space because sizeof(ColumnDefinition) was 736 and
that is too much, eg if schema would contain 100 columns it would take
73KB.
I have decided not to use polymorphic commands, I wanted to use
designated initializers with aggregates, the consequence of this is
usage of reinterpret_cast() :/, but it works great.
- renamed commands from XxCommandDefinition to XxCommand
- get rid of a data member name collisions (eg index_, from_, ...)
in the column and command definitions, consequence of division
column and commands
Added practically everything I wanted to have in except for updating
columns.
Needed to name the schema namespace as Orm::SchemaNs to avoid collision
with the Orm::Schema class.
- unit tests with great coverage
- new schema constants
- a new prefix_indexes and engine DB conncetion configurations
Others:
- IsModel tag
- enhanced columnize in the BaseGrammar
- used a new columnize logic in all grammars
- new constants
- new container utils class for joining containers
- new DB::driver() getter for QSqlDriver
- avoid possible crash in tests with pretend, added empty log checks
- clang tidy, excluded to word from short variable names
- added connectEagerly() that allows to force connection to the DB
- added isOpen()
- exposed isOpen()/connectEagerly()/pingDatabase() to DB and
DatabaseManager
Used __has_include() in #if macro directives instead of checking
_MSC_VER or __MINGW32__ to include mysql.h file.
- also modified #error directive calls