Commit Graph

89 Commits

Author SHA1 Message Date
silverqx c9cee67a13 removed DB alias to Orm::DB from global namespace 2022-01-13 15:40:11 +01:00
silverqx fc477bf1e5 added qmake/cmake option to disable ORM
Added TINYORM_DISABLE_ORM macro controlled by ORM for CMake and
disable_orm for qmake. When TINYORM_DISABLE_ORM macro is defined then
only the query builder without ORM is compiled.
Also excludes ORM-related unit tests.
2021-12-31 11:40:12 +01:00
silverqx ece372e655 bugfix cmake multi-config
Fixed file(GENERATE OUTPUT) for versiondebug_cmake-<CONFIG>.hpp file.
2021-12-29 12:42:24 +01:00
silverqx 8d744057b5 fixed clang-tidy diagnostics on Linux 2021-12-08 12:27:36 +01:00
silverqx d43e5ace15 enabled empty initializers to pass Weffc++
Redundant empty initializers have to be enabled to pass Weffc++.
2021-10-29 16:28:29 +02:00
silverqx 35cb2164d1 models namespace and global using/s
- all models added to Models namespace
   - it solved all google-global-names-in-headers
 - solved code model unable parsing
2021-10-29 10:35:54 +02:00
silverqx a0ba734cef bugfix memory leak, used unique_ptr 2021-10-28 23:10:42 +02:00
silverqx dc1c080a87 passed many cppcoreguidelines
Still disabled too many important cppcoreguidelines checks.
2021-10-28 21:49:06 +02:00
silverqx cf8690d2a1 reverted = {}; and = ""; redundant initializers 2021-10-28 16:33:09 +02:00
silverqx 930acaefb3 passed clang-tidy portability-*, readability-*
Enhanced .clang-tidy files.

 - -readability-function-cognitive-complexity for all tests
2021-10-28 14:55:28 +02:00
silverqx 48b2477f4c passed * clang-tidy (hpp files)
Diagnostics discovered by qtc6-beta1.
2021-10-26 12:22:56 +02:00
silverqx ff9ea7b2d7 passed google-* clang-tidy (cpp files)
- namespace-comments
 - using-namespaces
2021-10-25 09:34:44 +02:00
silverqx 537ba37e96 passed clang-tidy modernize-* 2021-10-24 10:01:26 +02:00
silverqx cea3b8a6ee used new QMYSQL/... constants everywhere 2021-10-21 10:36:35 +02:00
silverqx d2999dfcbf qmake/cmake unified debug output
- removed all occurrences of QT_NO_DEBUG_OUTPUT, it is up to user
 - TINYORM_DEBUG_SQL is enabled in debug builds and TINYORM_NO_DEBUG_SQL
   in release builds, user still can override debug build with
   TINYORM_NO_DEBUG_SQL
 - enhanced debug output in DatabaseConnection class
 - added driverNamePrintable(), databaseName(), hostName() to
   DB/DatabaseManager/DatabaseConnection
 - logquery added to NS and created library class for it
2021-10-21 09:48:53 +02:00
silverqx d7e357e5a0 fix typo in macro define 2021-10-07 15:23:42 +02:00
silverqx e8d98fdbcd qmake renamed tests/utils project to TinyUtils 2021-10-07 09:53:39 +02:00
silverqx 9a9a9d1e37 renamed utils.pri to TinyUtils.pri 2021-10-07 09:40:49 +02:00
silverqx 4deafe66a1 qmake static build support
Added CONFIG option inline_constants/extern_constants, in shared library
build is used extern_constants option ( can be overridden by
inline_constants option ) and in static library build is used
inline_constants option ( can not be overridden, extern constants cause
crash ).

 - refactored exports in TinyUtils
 - bugfix on tst_version for static build
2021-10-07 09:37:14 +02:00
silverqx c2d4e274aa removed todo task 2021-10-03 18:46:25 +02:00
silverqx 8800b4e366 removed todo tasks 2021-10-03 14:14:39 +02:00
silverqx 5753cb3fd7 bugfix cmake build on unix 2021-10-03 13:07:45 +02:00
silverqx 2924e99ce4 qmake extracted common logic for TINY_RELEASE_TYPE 2021-10-03 08:33:27 +02:00
silverqx f96e06ac40 added todo task 2021-10-02 19:50:27 +02:00
silverqx e4284de03c compile tst_version on MinGW
Compile also checkFileVersion_*() tests on MinGW.

 - bugfix undefined WINVER macro
2021-10-02 18:43:25 +02:00
silverqx e865417b77 qmake used single line syntax everywhere 2021-10-02 17:37:11 +02:00
silverqx e0f61b97fc qmake added Windows RC and manifest files
Windows RC and manifest files are compiled and embedded only on Windows
and when a shared library is built.
Also removed TinyOrm_mingw.rc file, RC file for MinGW is injected
through the main TinyOrm.rc.in file, I had to do it this way because is
not possible to pass more RC files by qmake's RC_FILE variable, cmake
can do this without problems.

 - bugfix FILEFLAGS, FILEFLAGSMASK for debug configuration was not set
2021-10-02 12:52:06 +02:00
silverqx 0ca3e11de8 bugfix qmake path to TinyUtils dll 2021-09-30 09:25:58 +02:00
silverqx 11116a274f moved utils.pri to tests/qmake/ 2021-09-29 21:40:41 +02:00
silverqx 994a02f89b qmake filepaths for checkFileVersion_*()
- sync build checkFileVersion_*() tests only on MSVC and when shared
   library build is on
2021-09-29 20:23:04 +02:00
silverqx fd38c383ee cmake obtain version info from version.hpp file
Discarded configuration of the version header file by version.hpp.in,
instead the project version is obtained from version.hpp file.

 - bugfix removed unused parameters in tiny_resource_and_manifest()
 - cmake appended version to TinyUtils
 - bugfix debug file flag in Windows RC files
 - added Windows RC and manifest files for TinyUtils library
 - build checkFileVersion_*() tests only on MSVC and when shared library
   build is on
2021-09-29 20:13:26 +02:00
silverqx 4d71f093da used HIWORD/LOWORD in version test 2021-09-27 21:02:41 +02:00
silverqx e0ebbd0d61 qmake obtain version info from version.hpp file
Discarded configuration of the version header file by version.hpp.in,
instead the project version is obtained from version.hpp file.

 - also added autotest to test these versions
 - like cherries on a cake, a real Product/FileVersion in exe/dll of the
   TinyOrm.dll and utils.dll is tested too 😲😎
 - added new Fs library class to the utils dll
 - renamed macro defines in utils project to TINYUTILS_XYZ_HPP
2021-09-27 19:09:59 +02:00
silverqx ed40e8cfe4 enabled Weffc++ 🚀🔥🙌 2021-09-21 08:00:44 +02:00
silverqx 9c6fbce800 added new gcc warnings for cmake build
Following new warnings was added:
 -Wshadow
 -Wundef
 -Wfloat-equal
 -Wformat-security
 -Wdouble-promotion
 -Wconversion
 -Wzero-as-null-pointer-constant

Fixed warnings from:
 -Wshadow
 -Wconversion
2021-09-03 15:22:52 +02:00
silverqx 245d7b10ae added ctest support 2021-08-31 17:33:11 +02:00
silverqx 52a9e56bbf added cmake build 😅💪 2021-08-31 09:02:14 +02:00
silverqx db5aa004a1 all exceptions moved to own folder and namespace 2021-08-05 21:13:23 +02:00
silverqx 936464252e added comment about db connections in tests 2021-08-03 16:59:08 +02:00
silverqx 5cf5a5b586 changed using format
Don't use alias when not needed.
2021-08-03 15:09:54 +02:00
silverqx fc18930321 unified connection factory method in tests 2021-08-03 14:47:02 +02:00
silverqx 7ca8910cc4 added querying relationship existence/absence
- support for querying nested relations existence/absence
 - added tests for all possible overloads 😲, 28 unit tests and 14
   functional tests
 - added has() related proxies to the Model and Relation
 - added documentation
 - gcc and clang specific fixes

others:

 - used clazy exclude comments instead of suppressing warnings in IDE
2021-08-03 09:31:31 +02:00
silverqx 05869939cf renamed test methods 2021-07-17 15:06:00 +02:00
silverqx 8cce88c8e4 replaced name strings with NAME constant in tests 2021-07-17 14:44:27 +02:00
silverqx 57ad613b20 replaced id strings with ID constant in tests 2021-07-17 14:44:26 +02:00
silverqx 7d1f03021b added global constants for most used strings 2021-07-17 14:41:28 +02:00
silverqx 40b639c458 subquery support for where() columns 🔥🚀
where() column can take lambda expression or QueryBuilder &
for subqueries.

 - added proxy methods
 - added unit tests
 - proxy methods tested manually
2021-07-15 16:44:23 +02:00
silverqx ef1660dd6d subquery support for where() values 🔥🚀
where() values can take labmbda expression or QueryBuilder &
for subqueries.

 - added proxy methods
 - added unit tests
2021-07-15 08:24:46 +02:00
silverqx 3b51e301a0 added comment 2021-07-04 20:19:04 +02:00
silverqx 5e174009e5 added Aggregates
- added shortcut aggregate functions count, min, max, sum, avg
 - also added unit and functional tests3
2021-07-04 19:54:49 +02:00