libpqxx
7.0.1
|
Efficiently pull data directly out of a table. More...
#include <stream_from.hxx>
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_from & | operator>> (Tuple &) |
template<typename... Vs> | |
stream_from & | operator>> (std::variant< Vs... > &)=delete |
Doing this with a variant is going to be horrifically borked. More... | |
Efficiently pull data directly out of a table.
pqxx::stream_from::stream_from | ( | transaction_base & | tb, |
std::string_view | table_name | ||
) |
pqxx::stream_from::stream_from | ( | transaction_base & | tb, |
std::string_view | table_name, | ||
Columns const & | columns | ||
) |
pqxx::stream_from::stream_from | ( | transaction_base & | tb, |
std::string_view | table_name, | ||
Iter | columns_begin, | ||
Iter | columns_end | ||
) |
|
noexcept |
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().
bool pqxx::stream_from::get_raw_line | ( | std::string & | line | ) |
References pqxx::transaction_base::conn(), pqxx::internal::enc_group(), pqxx::connection::encoding_id(), pqxx::internal::transactionfocus::m_trans, pqxx::internal::transactionfocus::register_me(), and pqxx::internal::transactionfocus::unregister_me().
Referenced by complete(), pqxx::stream_to::operator<<(), and operator>>().
|
noexcept |
|
noexcept |
stream_from & pqxx::stream_from::operator>> | ( | Tuple & | t | ) |
|
delete |
Doing this with a variant is going to be horrifically borked.