libpqxx  7.0.2
pqxx::stream_from Class Reference

Efficiently pull data directly out of a table. More...

#include <stream_from.hxx>

Inheritance diagram for pqxx::stream_from:

Public Member Functions

 stream_from (transaction_base &, std::string_view table_name)
 
template<typename Columns >
 stream_from (transaction_base &, std::string_view table_name, Columns const &columns)
 
template<typename Iter >
 stream_from (transaction_base &, std::string_view table_name, Iter columns_begin, Iter columns_end)
 
 ~stream_from () noexcept
 
 operator bool () const noexcept
 
bool operator! () const noexcept
 
void complete ()
 Finish this stream. Call this before continuing to use the connection. More...
 
bool get_raw_line (std::string &)
 
template<typename Tuple >
stream_fromoperator>> (Tuple &)
 
template<typename... Vs>
stream_fromoperator>> (std::variant< Vs... > &)=delete
 Doing this with a std::variant is going to be horrifically borked. More...
 
template<typename... TYPE>
auto iter ()
 Iterate over this stream. Supports range-based "for" loops. More...
 

Detailed Description

Efficiently pull data directly out of a table.

Constructor & Destructor Documentation

◆ stream_from() [1/3]

pqxx::stream_from::stream_from ( transaction_base tb,
std::string_view  table_name 
)

◆ stream_from() [2/3]

template<typename Columns >
pqxx::stream_from::stream_from ( transaction_base tb,
std::string_view  table_name,
Columns const &  columns 
)

◆ stream_from() [3/3]

template<typename Iter >
pqxx::stream_from::stream_from ( transaction_base tb,
std::string_view  table_name,
Iter  columns_begin,
Iter  columns_end 
)

◆ ~stream_from()

pqxx::stream_from::~stream_from ( )
noexcept

Member Function Documentation

◆ complete()

void pqxx::stream_from::complete ( )

Finish this stream. Call this before continuing to use the connection.

Consumes all remaining lines, and closes the stream.

This may take a while if you're abandoning the stream before it's done, so skip it in error scenarios where you're not planning to use the connection again afterwards.

References get_raw_line(), pqxx::is_null(), and pqxx::internal::transactionfocus::reg_pending_error().

◆ get_raw_line()

◆ iter()

template<typename... TYPE>
auto pqxx::stream_from::iter ( )

Iterate over this stream. Supports range-based "for" loops.

Produces an input iterator over the stream.

Do not call this yourself. Use it like "for (auto data : stream.iter())".

◆ operator bool()

pqxx::stream_from::operator bool ( ) const
noexcept

◆ operator!()

bool pqxx::stream_from::operator! ( ) const
noexcept

◆ operator>>() [1/2]

template<typename Tuple >
stream_from & pqxx::stream_from::operator>> ( Tuple &  t)

◆ operator>>() [2/2]

template<typename... Vs>
stream_from& pqxx::stream_from::operator>> ( std::variant< Vs... > &  )
delete

Doing this with a std::variant is going to be horrifically borked.


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