13 #ifndef PQXX_H_STREAM_TO
14 #define PQXX_H_STREAM_TO
16 #include "pqxx/compiler-public.hxx"
17 #include "pqxx/compiler-internal-pre.hxx"
18 #include "pqxx/transaction_base.hxx"
19 #include "pqxx/stream_base.hxx"
20 #include "pqxx/stream_from.hxx"
21 #include "pqxx/internal/type_utils.hxx"
75 const std::string &table_name,
76 const Columns& columns
82 const std::string &table_name,
96 void complete()
override;
117 void write_raw_line(
const std::string &);
122 const std::string &table_name,
123 const std::string &columns
126 void close()
override;
132 const std::string &table_name,
133 const Columns& columns
145 const std::string &table_name,
149 namedclass{
"stream_from", table_name},
155 columnlist(columns_begin, columns_end)
165 static std::string
escape(
const std::string &);
167 template<
typename T> std::string
operator()(
const T* t)
const
174 template<>
inline std::string TypedCopyEscaper::operator()<std::nullptr_t>(
175 const std::nullptr_t*
191 #include "pqxx/compiler-internal-post.hxx"
std::string operator()(const T *t) const
Definition: stream_to.hxx:167
stream_to(transaction_base &, const std::string &table_name)
Create a stream, without specifying columns.
Definition: stream_to.cxx:18
std::basic_ostream< CHAR > & operator<<(std::basic_ostream< CHAR > &S, const field &F)
Write a result field to any type of stream.
Definition: field.hxx:355
virtual void close()
Definition: stream_base.cxx:36
Efficiently write data directly to a database table.
Definition: stream_to.hxx:59
bool get_raw_line(std::string &)
Definition: stream_from.cxx:72
Efficiently pull data directly out of a table.
Definition: stream_from.hxx:29
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
Definition: stream_to.hxx:163
constexpr char number_to_digit(int i) noexcept
Definition: strconv.hxx:324
std::string escape(const std::string &s, const std::string &null)
Definition: tablewriter.cxx:131
void complete() override
Complete the operation, and check for errors.
Definition: stream_to.cxx:42
stream_to & operator<<(const Tuple &)
Insert a row of data.
Definition: stream_to.hxx:182
std::string to_string(const field &Obj)
Convert a field to a string.
Definition: result.cxx:451
Traits class for use in string conversions.
Definition: strconv.hxx:51
Interface definition (and common code) for "transaction" classes.
Definition: transaction_base.hxx:136
The home of all libpqxx classes, functions, templates, etc.
Definition: array.hxx:25
~stream_to() noexcept
Definition: stream_to.cxx:29
Definition: stream_base.hxx:27