Commit Graph

885 Commits

Author SHA1 Message Date
silverqx cc585638c6 added missing getters to BelongsTo relation 2022-08-19 14:43:44 +02:00
silverqx 6e603de56f whitespaces 2022-08-19 08:44:03 +02:00
silverqx 30dd9e823d added section comment 2022-08-19 08:10:57 +02:00
silverqx 20c54933f9 removed todo task 2022-08-19 07:39:20 +02:00
silverqx a59b78b392 updated todo task 2022-08-19 07:39:07 +02:00
silverqx 3a09be42e6 formatting, operators on the same line 2022-08-19 07:37:00 +02:00
silverqx f69f2eb543 removed std::optional for replicate except param. 2022-08-19 07:27:54 +02:00
silverqx 523601264c added Model::replicate
- also added move overload for Model::setRawAttributes
2022-08-18 21:07:23 +02:00
silverqx d54b041d81 added whereBetween and whereBetweenColumns
- added proxies
 - added unit and functional tests
 - added docs
 - updated number of unit tests to 1417
2022-08-18 11:12:48 +02:00
silverqx 31d606d59d bump versions to TinyORM v0.17.0 and tom v0.4.2 2022-08-17 18:14:30 +02:00
silverqx 43abc32192 removed constexpr 2022-08-17 17:12:37 +02:00
silverqx e6566fc474 used constFirst or front instead of at(0) 2022-08-17 13:45:29 +02:00
silverqx b3106b048a reordered methods in DB and DatabaseManager 2022-08-17 13:37:29 +02:00
silverqx 94d5b49adf added operator-> for conn. and config. hashes
Added operator-> for the DatabaseConfigurations/DatabaseConnectionsMap
hashes.

 - also made operator*, operator->, and get() constexpr and noexcept
2022-08-17 10:59:46 +02:00
silverqx f64f62902a fixtypo 2022-08-16 22:50:51 +02:00
silverqx 2c987ead90 bugfix tom count configs. instead of connections
Count registered connection configurations instead of opened
connections. 🫤

 - renamed connectionsSize to DB/DM::openedConnectionsSize()
 - added DB/DM::originalConfigsSize()
2022-08-16 21:15:51 +02:00
silverqx 3e6e3af9a0 made DM/DB::ConfigurationsType public 2022-08-16 21:09:36 +02:00
silverqx 05bdfda2b6 fixtypo 2022-08-16 21:08:00 +02:00
silverqx c86bc6a48f bump version to TinyORM v0.16.1 2022-08-15 14:08:57 +02:00
silverqx bc51c4733a renamed/unified connection parameters 2022-08-13 15:11:33 +02:00
silverqx bcb6d033aa added section comments 2022-08-13 15:10:50 +02:00
silverqx 2b1bed5e2a fixtypo 2022-08-13 15:09:17 +02:00
silverqx 45b94a77ec added TinyBuilder::upsert and proxies
The upsert method needed modification in the TinyBuilder, it has to also
manage model timestamps.

 - also added proxies
 - added functional test that also tests timestamps
 - added functional test on the BelongsToMany relation
 - updated number of unit tests to 1408
2022-08-13 14:06:01 +02:00
silverqx 59c046d743 whitespace 2022-08-13 13:20:06 +02:00
silverqx d0958e9a83 used auto instead of type 2022-08-13 13:19:52 +02:00
silverqx 502a0be478 avoid unnecessary variable initialization 2022-08-12 21:09:21 +02:00
silverqx 568ed37599 whitespace 2022-08-12 20:19:42 +02:00
silverqx ad25d7866f fixtypo 2022-08-12 20:19:35 +02:00
silverqx c388a0be18 bugfix missing include 2022-08-12 18:26:58 +02:00
silverqx 9a1646ff7c renamed parameter and variable 2022-08-12 17:35:28 +02:00
silverqx 5550d68eee added connection configuration getters to DB/DM
Added getters for obtaining connection configuration.

 - original configurations from the DatabaseManager
 - and configurations from the DatabaseConnection
2022-08-12 17:34:55 +02:00
silverqx 19c355cb00 changed method order 2022-08-12 16:08:57 +02:00
silverqx e436d9f63a extracted throwIfXyz method in DM 2022-08-12 15:39:10 +02:00
silverqx 5ff160dec5 use upsert alias on MySQL
The MySQL >=8.0.19 supports aliases in the VALUES and SET clauses
of INSERT INTO ... ON DUPLICATE KEY UPDATE statement for the row to be
inserted and its columns. It also generates warning from >=8.0.20 if
an old style used.

This enhancement detects the MySQL version and on the base of it uses
alias during the upsert call.

Also a user can override the version through the MySQL database
configuration. It helps to save/avoid one database query
(select version()) during the upsert method call or during connecting
to the MySQL database (version is needed if strict mode is enabled).

 - added unit and functional tests
 - updated number of unit tests to 1402
 - updated upsert docs
 - added ConfigUtils to avoid duplicates

Others:

 - added the version database configuration everywhere
 - docs added few lines about MySQL version configuration option
 - docs updated database configurations, added a new missing options
2022-08-12 15:37:56 +02:00
silverqx d8a024a937 removed unused forward declarations 2022-08-12 11:57:51 +02:00
silverqx 07b6b0fd42 added section comment 2022-08-12 11:55:48 +02:00
silverqx 1ec9543920 moved version constant to Orm::Constants 2022-08-12 11:54:59 +02:00
silverqx 61147986c6 added sections to connections
[skip ci]
2022-08-11 19:24:57 +02:00
silverqx 31da6ff85b bump version to TinyORM v0.16.0 2022-08-11 16:32:36 +02:00
silverqx fa6f6b9a7d added comment 2022-08-10 15:35:27 +02:00
silverqx aaf5038616 added sections to DB and DatabaseManager 2022-08-10 12:21:32 +02:00
silverqx 7be189b57a added sections to connectors 2022-08-10 09:19:55 +02:00
silverqx cfec8e438c used QStringList in upsert 2022-08-10 08:11:49 +02:00
silverqx b67d4f5050 added QueryBuilder::upsert
- added unit and functional auto tests
 - added docs
 - docs updated number of unit tests to 1393
2022-08-10 07:55:15 +02:00
silverqx 42bf74307d bump version to TinyORM v0.15.1 2022-08-08 19:24:02 +02:00
silverqx c2e6e31506 bump version to TinyORM v0.15.0 2022-08-07 19:34:45 +02:00
silverqx c5871f42a5 exposed Model/Related types on Relation classes 2022-08-07 18:09:46 +02:00
silverqx 52d4e6fd06 added chunk support for BelongsToMany relation
Added chunk, each, chunkMap, chunkById, and eachById
to the BelongsToMany relation.

 - added unit tests
2022-08-07 14:26:38 +02:00
silverqx 9b80936b7c bugfix swapped chunkById count argument 2022-08-07 13:19:38 +02:00
silverqx 851497571c removed todo task 2022-08-06 19:10:00 +02:00