|
- #pragma once
-
- #include <set>
-
- #include <cpphibernate/config.h>
-
- namespace cpphibernate {
- namespace mariadb {
-
- namespace __impl
- {
-
- /**
- * @brief Helper class to create attributes type.
- */
- template<typename X, typename = void>
- struct attributes_builder;
-
- }
-
- /**
- * @brief Attributes enumeration
- */
- enum class attribute_t
- {
- hex, //!< The field is stored hex encoded.
- compress, //!< The field is stored compressed.
- primary_key, //!< The field is the primary key.
- };
-
- /**
- * @brief Set of attributes.
- */
- struct attributes_t :
- public std::set<attribute_t>
- {
- using base_type = std::set<attribute_t>;
- using base_type::base_type;
- };
-
- /**
- * @brief Predicate to create attributes set from attributes schema.
- */
- constexpr decltype(auto) make_attributes = mp::generic_predicate<__impl::attributes_builder> { };
-
- } }
|