#pragma once #ifndef ORM_TINY_UTILS_ATTRIBUTE_HPP #define ORM_TINY_UTILS_ATTRIBUTE_HPP #include "orm/macros/systemheader.hpp" TINY_SYSTEM_HEADER #include "orm/ormtypes.hpp" TINYORM_BEGIN_COMMON_NAMESPACE namespace Orm::Tiny::Utils::Attribute { /*! Convert a AttributeItem QVector to QVariantMap. */ SHAREDLIB_EXPORT QVariantMap convertVectorToMap(const QVector &attributes); /*! Convert a vector of AttributeItem QVectors to the vector of QVariantMaps. */ SHAREDLIB_EXPORT QVector convertVectorsToMaps(const QVector> &attributesVector); /*! Convert a AttributeItem QVector to UpdateItem QVector. */ SHAREDLIB_EXPORT QVector convertVectorToUpdateItem(const QVector &attributes); /*! Convert a AttributeItem QVector to UpdateItem QVector. */ SHAREDLIB_EXPORT QVector convertVectorToUpdateItem(QVector &&attributes); /*! Remove attributes which have duplicite keys and leave only the last one. */ SHAREDLIB_EXPORT QVector removeDuplicitKeys(const QVector &attributes); /*! Join attributes and values for firstOrXx methods. */ SHAREDLIB_EXPORT QVector joinAttributesForFirstOr(const QVector &attributes, const QVector &values, const QString &keyName); } // namespace Orm::Tiny::Utils::Attribute TINYORM_END_COMMON_NAMESPACE #endif // ORM_TINY_UTILS_ATTRIBUTE_HPP