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" 34 const std::string &Name,
35 const std::string &Null=std::string{});
36 template<
typename ITER>
39 const std::string &Name,
42 template<
typename ITER>
43 PQXX_DEPRECATED tablereader(
45 const std::string &Name,
48 const std::string &Null);
49 ~tablereader() noexcept;
50 template<
typename TUPLE> tablereader &operator>>(TUPLE &);
51 operator bool() const noexcept {
return not m_done; }
53 bool get_raw_line(std::string &Line);
54 template<
typename TUPLE>
55 void tokenize(std::string, TUPLE &)
const;
56 virtual void complete()
override;
60 const std::string &RName,
61 const std::string &Columns=std::string{});
62 PQXX_PRIVATE
void reader_close();
63 std::string extract_field(
65 std::string::size_type &)
const;
70 template<
typename ITER>
inline 73 const std::string &Name,
76 namedclass{Name,
"tablereader"},
80 set_up(T, Name,
columnlist(begincolumns, endcolumns));
84 template<
typename ITER>
inline 87 const std::string &Name,
90 const std::string &Null) :
95 set_up(T, Name,
columnlist(begincolumns, endcolumns));
99 template<
typename TUPLE>
102 std::back_insert_iterator<TUPLE> ins = std::back_inserter(T);
103 std::string::size_type here = 0;
104 while (here < Line.size()) *ins++ = extract_field(Line, here);
108 template<
typename TUPLE>
117 #include "pqxx/compiler-internal-post.hxx" bool operator!() const noexcept
Definition: tablereader.hxx:52
Base class for obsolete tablereader/tablewriter classes.
Definition: tablestream.hxx:26
Interface definition (and common code) for "transaction" classes.
Definition: transaction_base.hxx:136
Definition: tablereader.hxx:29
void tokenize(std::string, TUPLE &) const
Definition: tablereader.hxx:100
tablereader(transaction_base &, const std::string &Name, const std::string &Null=std::string{})
Definition: tablereader.cxx:21
static std::string columnlist(ITER colbegin, ITER colend)
Definition: tablestream.hxx:52
namedclass(const std::string &Classname)
Definition: util.hxx:236
tablereader & operator>>(TUPLE &)
Definition: tablereader.hxx:109
bool get_raw_line(std::string &Line)
Definition: tablereader.cxx:55
The home of all libpqxx classes, functions, templates, etc.
Definition: array.hxx:25