13 #ifndef PQXX_H_TABLEREADER 14 #define PQXX_H_TABLEREADER 16 #include "pqxx/compiler-public.hxx" 17 #include "pqxx/compiler-internal-pre.hxx" 18 #include "pqxx/result.hxx" 19 #include "pqxx/tablestream.hxx" 33 const std::string &Name,
34 const std::string &Null=std::string());
35 template<
typename ITER>
38 const std::string &Name,
43 const std::string &Name,
46 const std::string &Null);
48 template<
typename TUPLE>
tablereader &operator>>(TUPLE &);
49 operator bool() const noexcept {
return !m_done; }
51 bool get_raw_line(std::string &Line);
52 template<
typename TUPLE>
53 void tokenize(std::string, TUPLE &)
const;
54 virtual void complete()
override;
58 const std::string &RName,
59 const std::string &Columns=std::string());
60 PQXX_PRIVATE
void reader_close();
61 std::string extract_field(
63 std::string::size_type &)
const;
68 template<
typename ITER>
inline 71 const std::string &Name,
74 namedclass(Name,
"tablereader"),
78 setup(T, Name,
columnlist(begincolumns, endcolumns));
82 template<
typename ITER>
inline 85 const std::string &Name,
88 const std::string &Null) :
93 setup(T, Name,
columnlist(begincolumns, endcolumns));
97 template<
typename TUPLE>
100 std::back_insert_iterator<TUPLE> ins = std::back_inserter(T);
101 std::string::size_type here=0;
102 while (here < Line.size()) *ins++ = extract_field(Line, here);
106 template<
typename TUPLE>
115 #include "pqxx/compiler-internal-post.hxx" bool operator!() const noexcept
Definition: tablereader.hxx:50
tablereader & operator>>(TUPLE &)
Definition: tablereader.hxx:107
namedclass(const std::string &Classname)
Definition: util.hxx:174
static std::string columnlist(ITER colbegin, ITER colend)
Definition: tablestream.hxx:49
bool get_raw_line(std::string &Line)
Definition: tablereader.cxx:55
The home of all libpqxx classes, functions, templates, etc.
Definition: array.hxx:22
Definition: tablereader.hxx:28
Interface definition (and common code) for "transaction" classes.
Definition: transaction_base.hxx:130
void tokenize(std::string, TUPLE &) const
Definition: tablereader.hxx:98
tablereader(transaction_base &, const std::string &Name, const std::string &Null=std::string())
Definition: tablereader.cxx:21
Definition: tablestream.hxx:24