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 47 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 53 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 420 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 430 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 435 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 439 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 444 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 82 of file range_types.hpp.

◆ Empty()

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

Definition at line 79 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 88 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 96 of file range_types.hpp.

◆ HasLowerBound()

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

Definition at line 84 of file range_types.hpp.

◆ HasUpperBound()

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

Definition at line 85 of file range_types.hpp.

◆ IsLowerBoundIncluded()

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

Definition at line 103 of file range_types.hpp.

◆ IsUpperBoundIncluded()

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

Definition at line 104 of file range_types.hpp.

◆ operator!=()

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

Definition at line 77 of file range_types.hpp.

◆ operator==()

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

Definition at line 447 of file range_types.hpp.

Friends And Related Symbol Documentation

◆ Range

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

Definition at line 108 of file range_types.hpp.


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