userver: userver/storages/postgres/io/decimal64.hpp Source File
Loading...
Searching...
No Matches
decimal64.hpp
Go to the documentation of this file.
1#pragma once
2
3/// @file userver/storages/postgres/io/decimal64.hpp
4/// @brief decimal64::Decimal I/O support
5/// @ingroup userver_postgres_parse_and_format
6
7#include <userver/decimal64/decimal64.hpp>
8#include <userver/storages/postgres/io/buffer_io.hpp>
9#include <userver/storages/postgres/io/buffer_io_base.hpp>
10#include <userver/storages/postgres/io/numeric_data.hpp>
11#include <userver/storages/postgres/io/type_mapping.hpp>
12
13USERVER_NAMESPACE_BEGIN
14
15namespace storages::postgres::io {
16
17template <int Prec, typename RoundPolicy>
21 using BaseType::BaseType;
22 using ValueType = typename BaseType::ValueType;
23
24 template <typename Buffer>
25 void operator()(const UserTypes&, Buffer& buffer) const {
29 }
30};
31
32template <int Prec, typename RoundPolicy>
36 using BaseType::BaseType;
37 using ValueType = typename BaseType::ValueType;
38
39 void operator()(const FieldBuffer& buffer) {
42 }
43};
44
45template <int Prec, typename RoundPolicy>
46struct CppToSystemPg<decimal64::Decimal<Prec, RoundPolicy>> : PredefinedOid<PredefinedOids::kNumeric> {};
47} // namespace storages::postgres::io
48
49USERVER_NAMESPACE_END