tablestream.hxx
#ifndef PQXX_H_TABLESTREAM
#define PQXX_H_TABLESTREAM
#include "pqxx/compiler-public.hxx"
#include "pqxx/compiler-internal-pre.hxx"
#include "pqxx/transaction_base.hxx"
namespace pqxx
{
class PQXX_LIBEXPORT PQXX_NOVTABLE tablestream :
public internal::transactionfocus
{
public:
explicit tablestream(
transaction_base &Trans,
const std::string &Null=std::string{});
virtual ~tablestream() noexcept =0;
virtual void complete() =0;
protected:
const std::string &NullStr() const { return m_null; }
bool is_finished() const noexcept { return m_finished; }
void base_close();
template<typename ITER>
static std::string columnlist(ITER colbegin, ITER colend);
private:
std::string m_null;
bool m_finished = false;
tablestream() =delete;
tablestream(const tablestream &) =delete;
tablestream &operator=(const tablestream &) =delete;
};
template<typename ITER> inline
std::string tablestream::columnlist(ITER colbegin, ITER colend)
{
return separated_list(",", colbegin, colend);
}
} // namespace pqxx
#include "pqxx/compiler-internal-post.hxx"
#endif
pqxx::tablestream::NullStr
const std::string & NullStr() const
Definition: tablestream.hxx:36
pqxx::tablestream::columnlist
static std::string columnlist(ITER colbegin, ITER colend)
Definition: tablestream.hxx:52
pqxx::tablestream::tablestream
tablestream(transaction_base &Trans, const std::string &Null=std::string{})
Definition: tablestream.cxx:17
pqxx::tablestream::is_finished
bool is_finished() const noexcept
Definition: tablestream.hxx:37
pqxx::tablestream
Base class for obsolete tablereader/tablewriter classes.
Definition: tablestream.hxx:26
pqxx::tablestream::~tablestream
virtual ~tablestream() noexcept=0
Definition: tablestream.cxx:26
pqxx::tablestream::base_close
void base_close()
Definition: tablestream.cxx:31
pqxx::separated_list
std::string separated_list(const std::string &sep, ITER begin, ITER end, ACCESS access)
Represent sequence of values as a string, joined by a given separator.
Definition: util.hxx:95
pqxx::internal::transactionfocus
Definition: transaction_base.hxx:43
pqxx::transaction_base
Interface definition (and common code) for "transaction" classes.
Definition: transaction_base.hxx:136
pqxx
The home of all libpqxx classes, functions, templates, etc.
Definition: array.hxx:25