userver: userver/storages/postgres/io/uuid.hpp Source File
Loading...
Searching...
No Matches
uuid.hpp
Go to the documentation of this file.
1#pragma once
2
3/// @file userver/storages/postgres/io/uuid.hpp
4/// @brief UUID (boost::uuids::uuid) I/O support
5/// @ingroup userver_postgres_parse_and_format
6
7#include <userver/storages/postgres/io/buffer_io.hpp>
8#include <userver/storages/postgres/io/buffer_io_base.hpp>
9#include <userver/storages/postgres/io/type_mapping.hpp>
10
11namespace boost::uuids {
12struct uuid;
13}
14
15USERVER_NAMESPACE_BEGIN
16
17namespace storages::postgres::io {
18
19template <>
23 using BaseType::BaseType;
24
25 void operator()(const UserTypes&, std::vector<char>& buf) const;
26 void operator()(const UserTypes&, std::string& buf) const;
27};
28
29template <>
33 using BaseType::BaseType;
34
35 void operator()(const FieldBuffer& buf);
36};
37
38template <>
39struct CppToSystemPg<boost::uuids::uuid>
40 : PredefinedOid<PredefinedOids::kUuid> {};
41
42} // namespace storages::postgres::io
43
44USERVER_NAMESPACE_END