userver: storages::postgres::io::traits Namespace Reference
Loading...
Searching...
No Matches
storages::postgres::io::traits Namespace Reference

Detailed Description

uPg input-output traits.

Namespace with metafunctions detecting different type traits needed for PostgreSQL input-output operations

Classes

struct  AddTupleConstRef
 
struct  AddTupleConstRef< std::tuple< T... > >
 
struct  BitContainerTraits
 
struct  BitContainerTraits< BitContainer, std::enable_if_t< std::is_integral_v< BitContainer > > >
 
struct  BitContainerTraits< std::array< bool, N > >
 
struct  BitContainerTraits< std::bitset< N > >
 
struct  CanUseEnumAsStrongTypedef
 
struct  ContainerFinalElement
 Detect type of multidimensional C++ container. More...
 
struct  DimensionCount
 Calculate number of dimensions in C++ container. More...
 
struct  DimensionCount< T >
 
struct  DimensionSize
 
struct  DimensionSize< std::array< T, N > >
 
struct  ExtractionTag
 
struct  ExtractionTag< T, std::enable_if_t< kIsRowType< T > > >
 
struct  FixedDimensions
 
struct  GetSetNull
 
struct  GetSetNull< boost::optional< T > >
 
struct  GetSetNull< Null< T > >
 
struct  GetSetNull< std::optional< T > >
 
struct  GetSetNull<::utils::OptionalRef< T > >
 
struct  GetSetNull<::utils::StrongTypedef< Tag, T, Ops > >
 
struct  HasFixedDimensions
 
struct  HasIntrospection
 
struct  Input
 Customisation point for parsers. More...
 
struct  Input< BoundedRange< T > >
 
struct  Input< Enum, std::enable_if_t< std::is_enum_v< Enum > &&!detail::CustomParserDefined< Enum > &&!IsMappedToUserType< Enum > &&storages::postgres::io::detail::HasToString< Enum > > >
 
struct  Input< formats::json::Value >
 
struct  Input< io::detail::Box >
 
struct  Input< io::detail::Circle >
 
struct  Input< io::detail::Line >
 
struct  Input< io::detail::LineSegment >
 
struct  Input< io::detail::Path >
 
struct  Input< io::detail::Point >
 
struct  Input< io::detail::Polygon >
 
struct  Input< Range< T > >
 
struct  Input< std::chrono::duration< Rep, Period > >
 Binary parser for std::chrono::duration. More...
 
struct  Input< T >
 
struct  Input< T, std::enable_if_t< std::is_enum_v< T > &&!detail::CustomParserDefined< T > &&IsMappedToUserType< T > > >
 
struct  Input< T, std::enable_if_t<!detail::CustomParserDefined< T > &&io::detail::kEnableArrayParser< T > > >
 
struct  Input< T, std::enable_if_t<!detail::CustomParserDefined< T > &&kIsRowType< T > > >
 
struct  IO
 A default deducer of parsers/formatters for a type/data format. Can be specialised for a type/format pair providing custom parsers/formatters. More...
 
struct  IsBitStringCompatible
 
struct  IsBitStringCompatible< std::array< bool, N > >
 
struct  IsBitStringCompatible< std::bitset< N > >
 
struct  IsBitStringCompatible<::utils::Flags< Enum > >
 
struct  IsByteaCompatible
 
struct  IsByteaCompatible< std::string >
 
struct  IsByteaCompatible< std::string_view >
 
struct  IsByteaCompatible< std::vector< char, VectorArgs... > >
 
struct  IsByteaCompatible< std::vector< unsigned char, VectorArgs... > >
 
struct  IsCompatibleContainer
 Mark C++ container type as supported by the driver. More...
 
struct  IsCompatibleContainer< io::detail::ContainerChunk< Container > >
 
struct  IsCompatibleContainer< std::array< T, Size > >
 
struct  IsCompatibleContainer< std::set< T... > >
 
struct  IsCompatibleContainer< std::unordered_set< T... > >
 
struct  IsCompatibleContainer< std::vector< T... > >
 
struct  IsCompatibleContainer<::utils::impl::ProjectingView< const Container, Projection > >
 
struct  IsMappedToPg
 Detect if the C++ type is mapped to a Postgres type. More...
 
struct  IsMappedToPg< boost::optional< T > >
 
struct  IsMappedToPg< Null< T > >
 
struct  IsMappedToPg< std::optional< T > >
 
struct  IsMappedToPg< T >
 
struct  IsMappedToPg<::utils::OptionalRef< T > >
 
struct  IsMappedToPg<::utils::StrongTypedef< Tag, T, Ops > >
 
struct  IsNullable
 Metafunction to detect nullability of a type. More...
 
struct  IsNullable< boost::optional< T > >
 Nullability traits for boost::optional. More...
 
struct  IsNullable< Null< T > >
 
struct  IsNullable< std::optional< T > >
 Nullability traits for std::optional. More...
 
struct  IsNullable<::utils::OptionalRef< T > >
 Nullability traits for USERVER_NAMESPACE::utils::OptionalRef. More...
 
struct  IsNullable<::utils::StrongTypedef< Tag, T, Ops > >
 
struct  IsSpecialMapping
 Mark C++ mapping a special case for disambiguation. More...
 
struct  IsSpecialMapping< boost::optional< T > >
 
struct  IsSpecialMapping< Null< T > >
 
struct  IsSpecialMapping< std::optional< T > >
 
struct  IsSpecialMapping< T >
 
struct  IsSpecialMapping<::utils::OptionalRef< T > >
 
struct  IsSpecialMapping<::utils::StrongTypedef< Tag, T, Ops > >
 
struct  IsTuple
 
struct  IsTuple< std::tuple< T... > >
 
struct  IsTupleOfRefs
 
struct  IsTupleOfRefs< std::tuple< T &... > >
 
struct  Output
 Customisation point for formatters. More...
 
struct  Output< BoundedRange< T > >
 
struct  Output< Enum, std::enable_if_t< std::is_enum_v< Enum > &&!detail::CustomFormatterDefined< Enum > &&!IsMappedToUserType< Enum > &&storages::postgres::io::detail::HasParse< Enum > > >
 
struct  Output< formats::json::Value >
 
struct  Output< io::detail::Box >
 
struct  Output< io::detail::Circle >
 
struct  Output< io::detail::Line >
 
struct  Output< io::detail::LineSegment >
 
struct  Output< io::detail::Path >
 
struct  Output< io::detail::Point >
 
struct  Output< io::detail::Polygon >
 
struct  Output< PlainJson >
 
struct  Output< Range< T > >
 
struct  Output< std::chrono::duration< Rep, Period > >
 Binary formatter for std::chrono::duration. More...
 
struct  Output< T >
 
struct  Output< T, std::enable_if_t< std::is_enum_v< T > &&!detail::CustomFormatterDefined< T > &&IsMappedToUserType< T > > >
 
struct  Output< T, std::enable_if_t<!detail::CustomFormatterDefined< T > &&io::detail::kEnableArrayFormatter< T > > >
 
struct  Output< T, std::enable_if_t<!detail::CustomFormatterDefined< T > &&IsMappedToUserType< T > &&kIsRowType< T > > >
 
struct  ParserBufferCategory
 Buffer category for parser. More...
 
struct  ParserBufferCategory< BufferParser< boost::optional< T > > >
 
struct  ParserBufferCategory< BufferParser< std::optional< T > > >
 
struct  ParserBufferCategory< BufferParser<::utils::StrongTypedef< Tag, T, Ops > > >
 
struct  ParserBufferCategory< io::detail::ArrayBinaryParser< T > >
 
struct  ParserBufferCategory< io::detail::BoundedRangeBinaryParser< T > >
 
struct  ParserBufferCategory< io::detail::BoxParser >
 
struct  ParserBufferCategory< io::detail::CircleParser >
 
struct  ParserBufferCategory< io::detail::CompositeBinaryParser< T > >
 
struct  ParserBufferCategory< io::detail::EnumParser< T > >
 
struct  ParserBufferCategory< io::detail::JsonParser >
 
struct  ParserBufferCategory< io::detail::LineParser >
 
struct  ParserBufferCategory< io::detail::LineSegmentParser >
 
struct  ParserBufferCategory< io::detail::PathParser >
 
struct  ParserBufferCategory< io::detail::PointParser >
 
struct  ParserBufferCategory< io::detail::PolygonParser >
 
struct  ParserBufferCategory< io::detail::RangeBinaryParser< T > >
 
struct  RemoveTupleReferences
 
struct  RemoveTupleReferences< std::tuple< T... > >
 
struct  RowCategory
 
struct  RowCategory<::utils::StrongTypedef< Tag, T, Ops > >
 
struct  TupleHasFormatters
 
struct  TupleHasFormatters< std::tuple< T... > >
 
struct  TupleHasParsers
 
struct  TupleHasParsers< std::tuple< T... > >
 
struct  TypeBufferCategory
 

Typedefs

template<typename T>
using EnableIfByteaCompatible = std::enable_if_t<IsByteaCompatible<T>{}>
 
template<typename T>
using EnableIfCanUseEnumAsStrongTypedef = std::enable_if_t<impl::CheckCanUseEnumAsStrongTypedef<T>()>
 
template<typename T>
using ParserBufferCategoryType = typename ParserBufferCategory<T>::type
 
template<bool Value>
using BoolConstant = std::bool_constant<Value>
 
template<std::size_t Value>
using SizeConstant = std::integral_constant<std::size_t, Value>
 
template<typename T>
using ContainerFinaleElementType = typename ContainerFinalElement<T>::type
 

Functions

template<typename T, T... Values>
constexpr std::array< T, sizeof...(Values)> MakeArray (const std::integer_sequence< T, Values... > &)
 
template<typename T>
constexpr bool CheckParser ()
 
template<typename T>
constexpr void CheckFormatter ()
 
template<typename T>
auto Inserter (T &container)
 

Variables

template<typename Container>
constexpr bool kHasFixedDimensions = HasFixedDimensions<Container>::value
 
template<typename T>
constexpr std::size_t kDimensionSize = DimensionSize<T>::value
 
template<typename T>
constexpr bool kIsBitStringCompatible = IsBitStringCompatible<T>::value
 
template<typename T>
constexpr bool kIsByteaCompatible = IsByteaCompatible<T>::value
 
template<typename T>
constexpr bool kIsNullable = IsNullable<T>::value
 
template<typename T>
constexpr BufferCategory kParserBufferCategory = ParserBufferCategory<T>::value
 
Buffer category for a type
template<typename T>
constexpr BufferCategory kTypeBufferCategory = TypeBufferCategory<T>::value
 
template<typename T>
constexpr std::size_t kDimensionCount = DimensionCount<T>::value
 

Row type traits

enum class  RowCategoryType {
  kNonRow ,
  kTuple ,
  kAggregate ,
  kIntrusiveIntrospection
}
 
template<RowCategoryType Tag>
using RowCategoryConstant = std::integral_constant<RowCategoryType, Tag>
 
template<typename T>
constexpr RowCategoryType kRowCategory = RowCategory<T>::value
 
template<typename T>
constexpr void AssertIsValidRowType ()
 

Typedef Documentation

◆ BoolConstant

template<bool Value>
using storages::postgres::io::traits::BoolConstant = std::bool_constant<Value>

Definition at line 18 of file type_traits.hpp.

◆ ContainerFinaleElementType

template<typename T>
using storages::postgres::io::traits::ContainerFinaleElementType = typename ContainerFinalElement<T>::type

Definition at line 99 of file type_traits.hpp.

◆ EnableIfByteaCompatible

template<typename T>
using storages::postgres::io::traits::EnableIfByteaCompatible = std::enable_if_t<IsByteaCompatible<T>{}>

Definition at line 38 of file bytea.hpp.

◆ EnableIfCanUseEnumAsStrongTypedef

template<typename T>
using storages::postgres::io::traits::EnableIfCanUseEnumAsStrongTypedef = std::enable_if_t<impl::CheckCanUseEnumAsStrongTypedef<T>()>

Definition at line 106 of file strong_typedef.hpp.

◆ ParserBufferCategoryType

template<typename T>
using storages::postgres::io::traits::ParserBufferCategoryType = typename ParserBufferCategory<T>::type

Definition at line 171 of file traits.hpp.

◆ RowCategoryConstant

template<RowCategoryType Tag>
using storages::postgres::io::traits::RowCategoryConstant = std::integral_constant<RowCategoryType, Tag>

Definition at line 116 of file row_types.hpp.

◆ SizeConstant

template<std::size_t Value>
using storages::postgres::io::traits::SizeConstant = std::integral_constant<std::size_t, Value>

Definition at line 20 of file type_traits.hpp.

Enumeration Type Documentation

◆ RowCategoryType

enum class storages::postgres::io::traits::RowCategoryType
strong

Definition at line 113 of file row_types.hpp.

Function Documentation

◆ AssertIsValidRowType()

template<typename T>
void storages::postgres::io::traits::AssertIsValidRowType ( )
constexpr

Definition at line 138 of file row_types.hpp.

◆ CheckFormatter()

template<typename T>
void storages::postgres::io::traits::CheckFormatter ( )
constexpr

Definition at line 150 of file traits.hpp.

◆ CheckParser()

template<typename T>
bool storages::postgres::io::traits::CheckParser ( )
constexpr

Definition at line 130 of file traits.hpp.

◆ Inserter()

template<typename T>
auto storages::postgres::io::traits::Inserter ( T & container)

Definition at line 125 of file type_traits.hpp.

◆ MakeArray()

template<typename T, T... Values>
std::array< T, sizeof...(Values)> storages::postgres::io::traits::MakeArray ( const std::integer_sequence< T, Values... > & )
constexpr

Definition at line 93 of file array_types.hpp.

Variable Documentation

◆ kDimensionCount

template<typename T>
std::size_t storages::postgres::io::traits::kDimensionCount = DimensionCount<T>::value
inlineconstexpr

Definition at line 71 of file type_traits.hpp.

◆ kDimensionSize

template<typename T>
std::size_t storages::postgres::io::traits::kDimensionSize = DimensionSize<T>::value
inlineconstexpr

Definition at line 65 of file array_types.hpp.

◆ kHasFixedDimensions

template<typename Container>
bool storages::postgres::io::traits::kHasFixedDimensions = HasFixedDimensions<Container>::value
inlineconstexpr

Definition at line 53 of file array_types.hpp.

◆ kIsBitStringCompatible

template<typename T>
bool storages::postgres::io::traits::kIsBitStringCompatible = IsBitStringCompatible<T>::value
inlineconstexpr

Definition at line 36 of file bitstring.hpp.

◆ kIsByteaCompatible

template<typename T>
bool storages::postgres::io::traits::kIsByteaCompatible = IsByteaCompatible<T>::value
inlineconstexpr

Definition at line 35 of file bytea.hpp.

◆ kIsNullable

template<typename T>
bool storages::postgres::io::traits::kIsNullable = IsNullable<T>::value
inlineconstexpr

Definition at line 16 of file nullable_traits.hpp.

◆ kParserBufferCategory

template<typename T>
BufferCategory storages::postgres::io::traits::kParserBufferCategory = ParserBufferCategory<T>::value
inlineconstexpr

Definition at line 173 of file traits.hpp.

◆ kRowCategory

template<typename T>
RowCategoryType storages::postgres::io::traits::kRowCategory = RowCategory<T>::value
inlineconstexpr

Definition at line 135 of file row_types.hpp.

◆ kTypeBufferCategory

template<typename T>
BufferCategory storages::postgres::io::traits::kTypeBufferCategory = TypeBufferCategory<T>::value
inlineconstexpr

Definition at line 190 of file traits.hpp.