mirror of
https://github.com/silverqx/TinyORM.git
synced 2026-01-23 19:39:31 -06:00
While ORM can be disabled, Orm::Utils has been split into Orm::Utils and Orm::Tiny::Utils (Orm::Tiny::TinyUtils alias). So when ORM is disabled then utils used only in the ORM will be excluded from a final build. - bugfix cmake undefined ORM option in TinySources
43 lines
1.5 KiB
C++
43 lines
1.5 KiB
C++
#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<AttributeItem> &attributes);
|
|
/*! Convert a vector of AttributeItem QVectors to the vector of QVariantMaps. */
|
|
SHAREDLIB_EXPORT QVector<QVariantMap>
|
|
convertVectorsToMaps(const QVector<QVector<AttributeItem>> &attributesVector);
|
|
|
|
/*! Convert a AttributeItem QVector to UpdateItem QVector. */
|
|
SHAREDLIB_EXPORT QVector<UpdateItem>
|
|
convertVectorToUpdateItem(const QVector<AttributeItem> &attributes);
|
|
/*! Convert a AttributeItem QVector to UpdateItem QVector. */
|
|
SHAREDLIB_EXPORT QVector<UpdateItem>
|
|
convertVectorToUpdateItem(QVector<AttributeItem> &&attributes);
|
|
|
|
/*! Remove attributes which have duplicite keys and leave only the last one. */
|
|
SHAREDLIB_EXPORT QVector<AttributeItem>
|
|
removeDuplicitKeys(const QVector<AttributeItem> &attributes);
|
|
|
|
/*! Join attributes and values for firstOrXx methods. */
|
|
SHAREDLIB_EXPORT QVector<AttributeItem>
|
|
joinAttributesForFirstOr(const QVector<WhereItem> &attributes,
|
|
const QVector<AttributeItem> &values,
|
|
const QString &keyName);
|
|
|
|
} // namespace Orm::Tiny::Utils::Attribute
|
|
|
|
TINYORM_END_COMMON_NAMESPACE
|
|
|
|
#endif // ORM_TINY_UTILS_ATTRIBUTE_HPP
|