Commit Graph

235 Commits

Author SHA1 Message Date
silverqx a9c57144d7 tom updated comments 2023-07-17 20:12:13 +02:00
silverqx ec5a34baeb tom updated comment 2023-07-17 20:04:03 +02:00
silverqx efd0b0b87a tom added section comment 2023-07-17 20:03:19 +02:00
silverqx 68c88dc2a1 tom fixtypo 2023-07-17 20:01:27 +02:00
silverqx cb73bfd514 tom added missing const
[skip ci]
2023-07-16 21:38:48 +02:00
silverqx d80144deee tom fixtypo
[skip ci]
2023-07-16 21:38:27 +02:00
silverqx 20cbda2ad8 added a new Progress constant 2023-07-11 17:42:30 +02:00
silverqx fa257e4121 added [[noreturn]] attribute to throw methods 2023-06-18 18:08:17 +02:00
silverqx 49e24c0c16 added HASH_ global string constant for "hash" 2023-06-16 15:09:58 +02:00
silverqx 159b5afb78 moved pivot_ constant to the Orm namespace 2023-05-19 11:37:31 +02:00
silverqx 8eb2b9e2ec fixtypo 2023-05-16 18:00:02 +02:00
silverqx 4c9bf9c7e9 added note constant 2023-05-05 14:14:15 +02:00
silverqx 56eb5ee036 bump version to TinyORM v0.30.3 and tom v0.5.7
[skip ci]
2023-04-17 09:15:49 +02:00
silverqx 8a9998a4ba bump version to TinyORM v0.30.2 and tom v0.5.6 2023-04-15 17:37:30 +02:00
silverqx 45b54f05a0 tom added compile-time type check for tabulate 2023-04-15 15:10:51 +02:00
silverqx 185be84222 bump version to tom v0.5.5
[skip ci]
2023-04-14 17:37:03 +02:00
silverqx 9139cb5aeb tom bugfix tabulate v1.5 Table::Row_t
Fixes #12
2023-04-14 17:05:56 +02:00
silverqx fb63c66c7f bump version to TinyORM v0.30.0 and tom v0.5.4
- also bump version to TinyUtils v0.3.0
2023-04-02 16:07:09 +02:00
silverqx 23a75a4fc8 used Q_DISABLE_COPY_MOVE() for library classes 2023-04-01 11:03:29 +02:00
silverqx c4b70ff337 enabled clang-tidy check
Enabled the performance-move-const-arg.
2023-04-01 11:03:28 +02:00
silverqx 7eade09dec whitespaces 2023-03-31 13:01:02 +02:00
silverqx dbd8279da5 tom used NotNull<T> instead of reference 2023-03-30 10:41:53 +02:00
silverqx c864addf94 tom added IWYU pragma 2023-03-30 10:19:28 +02:00
silverqx f32ed9e4e9 suppressed clang-tidy warning 2023-03-29 17:50:08 +02:00
silverqx 1e5d14acbf removed all const class data members
It's considered bad practice, I have only commented them.

tag: cppcoreguidelines-avoid-const-or-ref-data-members
2023-03-29 16:15:08 +02:00
silverqx 73961f45d6 added IWYU pragmas 2023-03-15 18:15:31 +01:00
silverqx c0dd5e132d added querybuilder.hpp to databasemanager.hpp
Added the #include querybuilder.hpp to the databasemanager.hpp so
everything will be ready if the user includes db.hpp.
2023-03-15 18:15:17 +01:00
silverqx dc5508f962 added IWYU pragmas 2023-03-15 17:56:01 +01:00
silverqx b2e3f09227 added new constants
Because of the MariaDB.
2023-03-14 12:48:22 +01:00
silverqx 051eb213e0 bump version to TinyORM v0.28.0 and tom v0.5.3
- refactored SchemaBuilder instantiation
 - added connection name to Exceptions::QueryError
 - tom added --pending option to migrate:status
 - tom added --batch=X option to migrate:rollback
 - docs added migrate --pending and --batch sections
 - schema added ability to add table comment
 - schema added ability to call comment() on SQLite
 - optimized eager loading when no keys to be loaded
 - dropped return value for connectEagerly()
 - allowed to pass QueryBuilder to whereExists
 - allowed to pass expression to pluck()
 - schema added datetimes and softDeletesDatetime
 - renamed to Blueprint::datetime/Tz()
 - schema added withoutForeignKeyConstraints()
 - added dropDatetimes() and dropSoftDeletesDatetime()
2023-02-22 14:43:01 +01:00
silverqx 9fb88f86aa tom added --batch=X option to migrate:rollback
It allows to rollback the given batch only, can by any existing batch.
2023-02-19 12:58:04 +01:00
silverqx 218e941fa7 tom added --pending option to migrate:status 2023-02-18 17:24:34 +01:00
silverqx 175ccd3795 Revert "used void() instead of Q_UNUSED()"
This reverts commit 28535947ed.
2023-02-15 17:35:51 +01:00
silverqx ecc3ceb89e tom prepared for tabulate v1.5
- used the tabulate::Table::Row_t for the InteractsWithIO::TableCell
 - also bugfix for the tabulate v1.4
2023-02-13 21:47:19 +01:00
silverqx b13728db08 refactored PostgreSQL search_path configuration
Changed from the 'schema' configuration option to the 'search_path',
the 'schema' config. option was dropped and currently throws exception
with a suggestion to use the 'search_path' instead.

The new 'search_path' config. option can be the QString or QStringList
and also supports to set an empty search_path using '' or empty QString
or QStringList.
This search_path config. option is correctly parsed and quoted.
Setting the search_path is initiated from the PostgresConnector
right after the database connection is established.

The PostgresSchemaBuilder is actively using the search_path during
practically all method calls (dropAllTables(), getColumnListing(),
hasTable(), ...). If the search_path is not defined then it queries
the database for the real search_path because the search_path can be
changed anytime and the search_path configuration option value can be
incorrect (out of sync).
It also works correctly with the empty search_path, in this case a fully
qualified table names are required. If the table name is not fully
qualified then the SearchPathEmptyError exception is thrown.
And it also works correctly with the "$user" PostgreSQL's variable, this
variable is resolved to the config["username"] during obtaining
the search_path from the database.

In the pretend mode it behaves little different, if pretending then
the 'search_path' is obtained from the connection configuration and
if the 'search_path' is not defined in the config. the 'public' will
be used as the default.

 - added many new unit and functional tests which are testing all the
   above described scenarios
   - added new functional test case tst_PostgreSQL_SchemaBuilder_f
   - added new functional test case tst_SchemaBuilder
   - added new tests for dropAllTable(), dropAllViews(), hasTable(),
     getColumnListing(), createDatabase(), dropDatabaseIfExists()
     for ALL supported databases
 - added new search_path constant
 - renamed env. variable to DB_PGSQL_SEARCHPATH (from DB_PGSQL_SCHEMA)
 - added new search_path and dont_drop configuration validations to
   check correct type (QString or QStringList)
 - added new 'schema' config. option validation
 - added new exception SearchPathEmptyError
 - started the TinyUtils::Databases refactor
2023-02-11 09:39:28 +01:00
silverqx 0248d9f9ea fixtypo 2023-02-10 19:26:00 +01:00
silverqx 28535947ed used void() instead of Q_UNUSED() 2023-02-10 15:31:53 +01:00
silverqx d9b7b3f056 added most useful constants to migration/seeder 2023-02-07 07:22:48 +01:00
silverqx 88e1a17890 shells sync zsh and bash autocomplete scripts
[skip ci]
2023-02-05 10:17:43 +01:00
silverqx 7a82d2f88c unified comments for Pure virtual destructors 2023-02-01 13:46:45 +01:00
silverqx ba6551daf8 bump versions to TinyORM v0.26.0 and tom v0.5.2
Last two TinyORM and tom releases was about performance optimizations.

Practically no performance gain, especially in production builds,
the MSVC optimized builds are amazing.

Some perf. gain in debug builds, but only few milliseconds,
from 50-200ms, and so many perf. optimizations done. 😵‍💫

 - bump also to TinyUtils v0.2.1 (forgotten version bump)
2022-12-19 18:57:17 +01:00
silverqx 1789c63a1a tom added reserve() for error wall 2022-12-17 13:54:06 +01:00
silverqx 51aa5820b7 tom removed static local variable
It's not needed after the previous commit.

 - also return the QString::size_type instead
2022-12-17 11:34:19 +01:00
silverqx ed1b040eb9 tom enhanced reserve() in HelpCommand 2022-12-17 11:34:19 +01:00
silverqx 9beda29737 tom whitespaces 2022-12-17 11:34:19 +01:00
silverqx cd3170b603 tom removed rvalue parameters in make commands 2022-12-17 11:34:19 +01:00
silverqx 67ab4ab725 used {} instead of "" 2022-12-16 18:04:25 +01:00
silverqx f3a2c468d9 bump versions to TinyORM v0.25.0 and tom v0.5.1 2022-12-15 13:59:18 +01:00
silverqx e1dc123ec1 workflows bugfix missing tabulate header
There is still an older version of the vcpkg.
2022-12-14 16:45:17 +01:00
silverqx f5ec91d173 bugfix tom after upgrade to tabulate v1.4.0 2022-12-14 16:22:27 +01:00