userver: userver/storages/postgres/io/io_fwd.hpp Source File
Loading...
Searching...
No Matches
io_fwd.hpp
Go to the documentation of this file.
1#pragma once
2
3/// @file userver/storages/postgres/io/io_fwd.hpp
4/// @brief Forward declarations of types for PostgreSQL mappings.
5/// @ingroup userver_postgres_parse_and_format
6
7USERVER_NAMESPACE_BEGIN
8
9namespace storages::postgres::io {
10
11/// @brief Primary template for declaring mapping to a PostgreSQL system type.
12template <typename T>
13struct CppToSystemPg;
14
15/// @brief Primary template for declaring mapping to a PostgreSQL user type.
16///
17/// Must contain a `static constexpr DBTypeName postgres_name` member.
18///
19/// For more information see @ref scripts/docs/en/userver/pg/user_types.md
20///
21/// For enumerated types must derive from EnumMappingBase template and have a
22/// `static constexpr EnumeratorList enumerators` member. The EnumeratorList
23/// is a type alias declared in EnumMappingBase.
24template <typename T>
25struct CppToUserPg;
26
27} // namespace storages::postgres::io
28
29USERVER_NAMESPACE_END