From b15aea75ac457adb7e2e6d0c4f025420614d7c41 Mon Sep 17 00:00:00 2001 From: silverqx Date: Wed, 7 Aug 2024 14:42:56 +0200 Subject: [PATCH] added comments --- include/orm/query/querybuilder.hpp | 1 + include/orm/tiny/concerns/hasrelationstore.hpp | 2 ++ .../tiny/exceptions/relationmappingnotfounderror.hpp | 3 +++ include/orm/tiny/support/stores/baserelationstore.hpp | 11 +++++++++++ 4 files changed, 17 insertions(+) diff --git a/include/orm/query/querybuilder.hpp b/include/orm/query/querybuilder.hpp index 58c1e0a10..c7fa385fe 100644 --- a/include/orm/query/querybuilder.hpp +++ b/include/orm/query/querybuilder.hpp @@ -822,6 +822,7 @@ namespace Orm::Query /*! Builder property types. */ enum struct PropertyType : quint8 { + /*! Columns property type (used to clone query without column names). */ COLUMNS, }; diff --git a/include/orm/tiny/concerns/hasrelationstore.hpp b/include/orm/tiny/concerns/hasrelationstore.hpp index 218004d2f..f6be380b7 100644 --- a/include/orm/tiny/concerns/hasrelationstore.hpp +++ b/include/orm/tiny/concerns/hasrelationstore.hpp @@ -119,7 +119,9 @@ namespace Orm::Tiny::Concerns /*! Type of the template message to generate. */ enum struct CopyMoveTemplateType : quint8 { + /*! Tags copy constructor and assignment operator. */ COPY, + /*! Tags move constructor and assignment operator. */ MOVE, }; /*! Template message for the Q_ASSERT_X() check in copy/move constructors. */ diff --git a/include/orm/tiny/exceptions/relationmappingnotfounderror.hpp b/include/orm/tiny/exceptions/relationmappingnotfounderror.hpp index 2a3f98370..e98c691ce 100644 --- a/include/orm/tiny/exceptions/relationmappingnotfounderror.hpp +++ b/include/orm/tiny/exceptions/relationmappingnotfounderror.hpp @@ -20,8 +20,11 @@ namespace Orm::Tiny::Exceptions /*! Exception message will be generated on the base of this enum struct. */ enum struct From : qint8 { + /*! Tags undefined relation (used in exception messages). */ UNDEFINED = -1, + /*! Tags Belongs to relation (used in exception messages). */ BELONGS_TO = 0, + /*! Tags Belongs to many relation (used in exception messages). */ BELONGS_TO_MANY = 1, }; diff --git a/include/orm/tiny/support/stores/baserelationstore.hpp b/include/orm/tiny/support/stores/baserelationstore.hpp index 522989853..10140e761 100644 --- a/include/orm/tiny/support/stores/baserelationstore.hpp +++ b/include/orm/tiny/support/stores/baserelationstore.hpp @@ -66,16 +66,27 @@ namespace Support::Stores /*! Type of data saved in the relation store. */ enum struct RelationStoreType : quint8 { + /*! The store for loading eager relations. */ EAGER, + /*! The store for loading eager relations (collection of pointers). */ EAGER_POINTERS, + /*! The store for the Model push() method. */ PUSH, + /*! The store for touching owner's timestamps. */ TOUCH_OWNERS, + /*! The store for the lazy loading. */ LAZY_RESULTS, + /*! The store to obtain the related table name for BelongsToMany relation. */ BELONGSTOMANY_RELATED_TABLE, + /*! Save arguments needed to build a query for last relation in hasNested(). */ QUERIES_RELATIONSHIPS_QUERY, + /*! Save arguments needed to build a query for last relation in hasNested(). */ QUERIES_RELATIONSHIPS_TINY, + /*! Save arguments needed to build a query for last relation in hasNested(). */ QUERIES_RELATIONSHIPS_TINY_NESTED, + /*! The store for serializing relationship (QVariantMap). */ RELATION_TO_MAP, + /*! The store for serializing relationship (QList). */ RELATION_TO_VECTOR, };