userver: storages::postgres::Range< T > Class Template Reference
Loading...
Searching...
No Matches
storages::postgres::Range< T > Class Template Reference

Detailed Description

template<typename T>
class storages::postgres::Range< T >

Definition at line 40 of file range_types.hpp.

Public Types

using OptionalValue = std::optional<T>
 

Public Member Functions

 Range ()=default
 Empty range.
 
 Range (UnboundedType, UnboundedType) noexcept
 Unbounded range.
 
template<typename U , typename = std::enable_if_t< std::is_convertible_v<std::decay_t<U>, T>>>
 Range (U &&lower, U &&upper, RangeBounds bounds=RangeBound::kLower)
 Bounded range.
 
template<typename U , typename = std::enable_if_t< std::is_convertible_v<std::decay_t<U>, T>>>
 Range (U &&lower, UnboundedType ub, RangeBounds bounds=RangeBound::kLower) noexcept(kNothrowValueCopy)
 Range with a lower bound.
 
template<typename U , typename = std::enable_if_t< std::is_convertible_v<std::decay_t<U>, T>>>
 Range (UnboundedType ub, U &&upper, RangeBounds bounds=RangeBound::kNone) noexcept(kNothrowValueCopy)
 Range with an upper bound.
 
 Range (const OptionalValue &lower, const OptionalValue &upper, RangeBounds bounds)
 
template<typename U , typename = std::enable_if_t<std::is_convertible_v<U, T>>>
 Range (const Range< U > &rhs)
 
bool operator== (const Range &rhs) const
 
bool operator!= (const Range &rhs) const
 
bool Empty () const
 
void Clear ()
 Make the range empty.
 
bool HasLowerBound () const
 
bool HasUpperBound () const
 
const OptionalValue & GetLowerBound () const
 Get the lower bound.
 
const OptionalValue & GetUpperBound () const
 Get the upper bound.
 
bool IsLowerBoundIncluded () const
 
bool IsUpperBoundIncluded () const
 

Member Typedef Documentation

◆ OptionalValue

template<typename T >
using storages::postgres::Range< T >::OptionalValue = std::optional<T>

Definition at line 50 of file range_types.hpp.

Constructor & Destructor Documentation

◆ Range() [1/6]

template<typename T >
storages::postgres::Range< T >::Range ( UnboundedType ,
UnboundedType  )
inlinenoexcept

Unbounded range.

Definition at line 56 of file range_types.hpp.

◆ Range() [2/6]

template<typename T >
template<typename U , typename >
storages::postgres::Range< T >::Range ( U && lower,
U && upper,
RangeBounds bounds = RangeBound::kLower )

Bounded range.

Definition at line 461 of file range_types.hpp.

◆ Range() [3/6]

template<typename T >
template<typename U , typename >
storages::postgres::Range< T >::Range ( U && lower,
UnboundedType ub,
RangeBounds bounds = RangeBound::kLower )
noexcept

Range with a lower bound.

Definition at line 471 of file range_types.hpp.

◆ Range() [4/6]

template<typename T >
template<typename U , typename >
storages::postgres::Range< T >::Range ( UnboundedType ub,
U && upper,
RangeBounds bounds = RangeBound::kNone )
noexcept

Range with an upper bound.

Definition at line 477 of file range_types.hpp.

◆ Range() [5/6]

template<typename T >
storages::postgres::Range< T >::Range ( const OptionalValue & lower,
const OptionalValue & upper,
RangeBounds bounds )

Definition at line 482 of file range_types.hpp.

◆ Range() [6/6]

template<typename T >
template<typename U , typename >
storages::postgres::Range< T >::Range ( const Range< U > & rhs)

Convert from a range of different type.

Intentionally implicit

Definition at line 488 of file range_types.hpp.

Member Function Documentation

◆ Clear()

template<typename T >
void storages::postgres::Range< T >::Clear ( )
inline

Make the range empty.

Definition at line 92 of file range_types.hpp.

◆ Empty()

template<typename T >
bool storages::postgres::Range< T >::Empty ( ) const
inline

Definition at line 89 of file range_types.hpp.

◆ GetLowerBound()

template<typename T >
const OptionalValue & storages::postgres::Range< T >::GetLowerBound ( ) const
inline

Get the lower bound.

Definition at line 102 of file range_types.hpp.

◆ GetUpperBound()

template<typename T >
const OptionalValue & storages::postgres::Range< T >::GetUpperBound ( ) const
inline

Get the upper bound.

Definition at line 110 of file range_types.hpp.

◆ HasLowerBound()

template<typename T >
bool storages::postgres::Range< T >::HasLowerBound ( ) const
inline

Definition at line 94 of file range_types.hpp.

◆ HasUpperBound()

template<typename T >
bool storages::postgres::Range< T >::HasUpperBound ( ) const
inline

Definition at line 97 of file range_types.hpp.

◆ IsLowerBoundIncluded()

template<typename T >
bool storages::postgres::Range< T >::IsLowerBoundIncluded ( ) const
inline

Definition at line 117 of file range_types.hpp.

◆ IsUpperBoundIncluded()

template<typename T >
bool storages::postgres::Range< T >::IsUpperBoundIncluded ( ) const
inline

Definition at line 120 of file range_types.hpp.

◆ operator!=()

template<typename T >
bool storages::postgres::Range< T >::operator!= ( const Range< T > & rhs) const
inline

Definition at line 87 of file range_types.hpp.

◆ operator==()

template<typename T >
bool storages::postgres::Range< T >::operator== ( const Range< T > & rhs) const

Definition at line 491 of file range_types.hpp.

Friends And Related Symbol Documentation

◆ Range

template<typename T >
template<typename U >
friend class Range
friend

Definition at line 126 of file range_types.hpp.


The documentation for this class was generated from the following file: