lintel 0.2.0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
lintel::Page< T > Class Template Reference

#include <Page.h>

Public Member Functions

 Page (std::vector< T > items, const bool hasMore, std::optional< std::string > nextAfter)
 
const std::vector< T > & getItems () const
 
bool hasMore () const
 
const std::optional< std::string > & getNextAfter () const
 

Detailed Description

template<typename T>
class lintel::Page< T >

A single page of keyset-paginated results.

Template Parameters
Tthe element type of the page

Constructor & Destructor Documentation

◆ Page()

template<typename T >
lintel::Page< T >::Page ( std::vector< T >  items,
const bool  hasMore,
std::optional< std::string >  nextAfter 
)
inline

Constructs a page.

Parameters
itemsthe items of this page
hasMoretrue if more items follow
nextAfterthe sort key of the last item (nullopt for an empty page)

Member Function Documentation

◆ getItems()

template<typename T >
const std::vector< T > & lintel::Page< T >::getItems ( ) const
inline
Returns
the items of this page

◆ getNextAfter()

template<typename T >
const std::optional< std::string > & lintel::Page< T >::getNextAfter ( ) const
inline
Returns
the sort key of the last item, nullopt if the page is empty

◆ hasMore()

template<typename T >
bool lintel::Page< T >::hasMore ( ) const
inline
Returns
true if further items exist after this page

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