│ │ │ │
│ │ │ │ -
│ │ │ │ +
│ │ │ │
│ │ │ │ -
│ │ │ │ +
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -
│ │ │ │ -
│ │ │ │ +
13#ifndef PQXX_H_STREAM_TO
│ │ │ │ +
14#define PQXX_H_STREAM_TO
│ │ │ │
│ │ │ │
16#if !defined(PQXX_HEADER_PRE)
│ │ │ │
17# error "Include libpqxx headers as <pqxx/header>, not <pqxx/header.hxx>."
│ │ │ │
│ │ │ │
│ │ │ │ -
20#if pqxx_have_source_location
│ │ │ │ -
21# include <source_location>
│ │ │ │ -
│ │ │ │ +
20#include "pqxx/separated_list.hxx"
│ │ │ │ +
21#include "pqxx/transaction_base.hxx"
│ │ │ │ +
│ │ │ │
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ +
│ │ │ │ +
│ │ │ │
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
47struct PQXX_LIBEXPORT
failure : std::runtime_error
│ │ │ │ -
│ │ │ │ -
49#if pqxx_have_source_location
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
52 std::source_location = std::source_location::current());
│ │ │ │ -
53 std::source_location location;
│ │ │ │ -
│ │ │ │ -
55 explicit failure(std::string
const &);
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │
│ │ │ │ -
│ │ │ │ +
│ │ │ │
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
85#
if pqxx_have_source_location
│ │ │ │ -
│ │ │ │ -
87 std::source_location = std::source_location::current()
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
106#
if pqxx_have_source_location
│ │ │ │ -
│ │ │ │ -
108 std::source_location = std::source_location::current()
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
119#
if pqxx_have_source_location
│ │ │ │ -
│ │ │ │ -
121 std::source_location = std::source_location::current()
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
134 std::string
const m_query;
│ │ │ │ -
136 std::string
const m_sqlstate;
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
140 std::string
const &whatarg =
"", std::string
const &Q =
"",
│ │ │ │ -
141 char const sqlstate[] =
nullptr
│ │ │ │ -
142#
if pqxx_have_source_location
│ │ │ │ -
│ │ │ │ -
144 std::source_location = std::source_location::current()
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
150 [[nodiscard]] PQXX_PURE std::
string const &query() const noexcept;
│ │ │ │ -
│ │ │ │ -
153 [[nodiscard]] PQXX_PURE std::
string const &sqlstate() const noexcept;
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
168#
if pqxx_have_source_location
│ │ │ │ -
│ │ │ │ -
170 std::source_location = std::source_location::current()
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
180 std::string
const &whatarg, std::string
const &q =
"",
│ │ │ │ -
181 char const sqlstate[] =
nullptr
│ │ │ │ -
182#
if pqxx_have_source_location
│ │ │ │ -
│ │ │ │ -
184 std::source_location = std::source_location::current()
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
107 return {tx, path, columns};
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
122 std::initializer_list<std::string_view> columns = {})
│ │ │ │ +
│ │ │ │ +
124 auto const &conn{tx.
conn()};
│ │ │ │ +
125 return raw_table(tx, conn.quote_table(path), conn.quote_columns(columns));
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
128#if defined(PQXX_HAVE_CONCEPTS)
│ │ │ │ +
│ │ │ │ +
137 template<PQXX_CHAR_STRINGS_ARG COLUMNS>
│ │ │ │ +
│ │ │ │ +
139 table(transaction_base &tx,
table_path path, COLUMNS
const &columns)
│ │ │ │ +
│ │ │ │ +
141 auto const &conn{tx.conn()};
│ │ │ │ +
│ │ │ │ +
143 tx, conn.quote_table(path), tx.conn().quote_columns(columns));
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
154 template<PQXX_CHAR_STRINGS_ARG COLUMNS>
│ │ │ │ +
│ │ │ │ +
156 table(transaction_base &tx, std::string_view path, COLUMNS
const &columns)
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
172 [[deprecated(
"Use table() or raw_table() factory.")]]
stream_to(
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
180 template<
typename Columns>
│ │ │ │ +
181 [[deprecated(
"Use table() or raw_table() factory.")]]
stream_to(
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
187 template<
typename Iter>
│ │ │ │ +
188 [[deprecated(
"Use table() or raw_table() factory.")]]
stream_to(
│ │ │ │ +
│ │ │ │ +
│ │ │ │
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
202 std::string
const &whatarg, std::string
const &q,
│ │ │ │ -
203 char const sqlstate[] =
nullptr
│ │ │ │ -
204#
if pqxx_have_source_location
│ │ │ │ -
│ │ │ │ -
206 std::source_location = std::source_location::current()
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
216 std::string
const &whatarg, std::string
const &q,
│ │ │ │ -
217 char const sqlstate[] =
nullptr
│ │ │ │ -
218#
if pqxx_have_source_location
│ │ │ │ -
│ │ │ │ -
220 std::source_location = std::source_location::current()
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
196 m_finished{other.m_finished},
│ │ │ │ +
197 m_buffer{std::move(other.m_buffer)},
│ │ │ │ +
198 m_field_buf{std::move(other.m_field_buf)},
│ │ │ │ +
199 m_finder{other.m_finder}
│ │ │ │ +
│ │ │ │ +
201 other.m_finished =
true;
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
206 [[nodiscard]] constexpr operator
bool() const noexcept
│ │ │ │ +
│ │ │ │ +
208 return not m_finished;
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
230 std::string
const &whatarg, std::string
const &q,
│ │ │ │ -
231 char const sqlstate[] =
nullptr
│ │ │ │ -
232#
if pqxx_have_source_location
│ │ │ │ -
│ │ │ │ -
234 std::source_location = std::source_location::current()
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
252#
if pqxx_have_source_location
│ │ │ │ -
│ │ │ │ -
254 std::source_location = std::source_location::current()
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
258#if pqxx_have_source_location
│ │ │ │ -
259 std::source_location location;
│ │ │ │ -
│ │ │ │ -
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │
│ │ │ │ +
│ │ │ │
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
269#
if pqxx_have_source_location
│ │ │ │ -
│ │ │ │ -
271 std::source_location = std::source_location::current()
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
275#if pqxx_have_source_location
│ │ │ │ -
276 std::source_location location;
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
267 fill_buffer(fields...);
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
276 bool m_finished =
false;
│ │ │ │ +
│ │ │ │ +
279 std::string m_buffer;
│ │ │ │
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
286#
if pqxx_have_source_location
│ │ │ │ -
│ │ │ │ -
288 std::source_location = std::source_location::current()
│ │ │ │ -
│ │ │ │ -
│ │ │ │ +
282 std::string m_field_buf;
│ │ │ │ +
│ │ │ │ +
285 internal::char_finder_func *m_finder;
│ │ │ │ +
│ │ │ │ +
288 void write_raw_line(std::string_view);
│ │ │ │ +
│ │ │ │
│ │ │ │ -
292#if pqxx_have_source_location
│ │ │ │ -
293 std::source_location location;
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
296 static constexpr std::string_view null_field{
"\\N\t"};
│ │ │ │
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
303#
if pqxx_have_source_location
│ │ │ │ -
│ │ │ │ -
305 std::source_location = std::source_location::current()
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
316#
if pqxx_have_source_location
│ │ │ │ -
│ │ │ │ -
318 std::source_location = std::source_location::current()
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
329#
if pqxx_have_source_location
│ │ │ │ -
│ │ │ │ -
331 std::source_location = std::source_location::current()
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
335#if pqxx_have_source_location
│ │ │ │ -
336 std::source_location location;
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
344#if pqxx_have_source_location
│ │ │ │ -
│ │ │ │ -
346 std::string
const &msg,
│ │ │ │ -
347 std::source_location loc = std::source_location::current()) :
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
359#if pqxx_have_source_location
│ │ │ │ -
│ │ │ │ -
361 std::string
const &err, std::string
const &Q =
"",
│ │ │ │ -
362 char const sqlstate[] =
nullptr,
│ │ │ │ -
363 std::source_location loc = std::source_location::current()) :
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
368 std::string
const &err, std::string
const &Q =
"",
│ │ │ │ -
369 char const sqlstate[] =
nullptr) :
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
378#if pqxx_have_source_location
│ │ │ │ -
│ │ │ │ -
380 std::string
const &err, std::string
const &Q =
"",
│ │ │ │ -
381 char const sqlstate[] =
nullptr,
│ │ │ │ -
382 std::source_location loc = std::source_location::current()) :
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
387 std::string
const &err, std::string
const &Q =
"",
│ │ │ │ -
388 char const sqlstate[] =
nullptr) :
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
396#if pqxx_have_source_location
│ │ │ │ -
│ │ │ │ -
398 std::string
const &err, std::string
const &Q =
"",
│ │ │ │ -
399 char const sqlstate[] =
nullptr,
│ │ │ │ -
400 std::source_location loc = std::source_location::current()) :
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
405 std::string
const &err, std::string
const &Q =
"",
│ │ │ │ -
406 char const sqlstate[] =
nullptr) :
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
414#if pqxx_have_source_location
│ │ │ │ -
│ │ │ │ -
416 std::string
const &err, std::string
const &Q =
"",
│ │ │ │ -
417 char const sqlstate[] =
nullptr,
│ │ │ │ -
418 std::source_location loc = std::source_location::current()) :
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
423 std::string
const &err, std::string
const &Q =
"",
│ │ │ │ -
424 char const sqlstate[] =
nullptr) :
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
432#if pqxx_have_source_location
│ │ │ │ -
│ │ │ │ -
434 std::string
const &err, std::string
const &Q =
"",
│ │ │ │ -
435 char const sqlstate[] =
nullptr,
│ │ │ │ -
436 std::source_location loc = std::source_location::current()) :
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
441 std::string
const &err, std::string
const &Q =
"",
│ │ │ │ -
442 char const sqlstate[] =
nullptr) :
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
450#if pqxx_have_source_location
│ │ │ │ -
│ │ │ │ -
452 std::string
const &err, std::string
const &Q =
"",
│ │ │ │ -
453 char const sqlstate[] =
nullptr,
│ │ │ │ -
454 std::source_location loc = std::source_location::current()) :
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
459 std::string
const &err, std::string
const &Q =
"",
│ │ │ │ -
460 char const sqlstate[] =
nullptr) :
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
468#if pqxx_have_source_location
│ │ │ │ -
│ │ │ │ -
470 std::string
const &err, std::string
const &Q =
"",
│ │ │ │ -
471 char const sqlstate[] =
nullptr,
│ │ │ │ -
472 std::source_location loc = std::source_location::current()) :
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
477 std::string
const &err, std::string
const &Q =
"",
│ │ │ │ -
478 char const sqlstate[] =
nullptr) :
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
486#if pqxx_have_source_location
│ │ │ │ -
│ │ │ │ -
488 std::string
const &err, std::string
const &Q =
"",
│ │ │ │ -
489 char const sqlstate[] =
nullptr,
│ │ │ │ -
490 std::source_location loc = std::source_location::current()) :
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
495 std::string
const &err, std::string
const &Q =
"",
│ │ │ │ -
496 char const sqlstate[] =
nullptr) :
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
504#if pqxx_have_source_location
│ │ │ │ -
│ │ │ │ -
506 std::string
const &err, std::string
const &Q =
"",
│ │ │ │ -
507 char const sqlstate[] =
nullptr,
│ │ │ │ -
508 std::source_location loc = std::source_location::current()) :
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
513 std::string
const &err, std::string
const &Q =
"",
│ │ │ │ -
514 char const sqlstate[] =
nullptr) :
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
522#if pqxx_have_source_location
│ │ │ │ -
│ │ │ │ -
524 std::string
const &err, std::string
const &Q =
"",
│ │ │ │ -
525 char const sqlstate[] =
nullptr,
│ │ │ │ -
526 std::source_location loc = std::source_location::current()) :
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
531 std::string
const &err, std::string
const &Q =
"",
│ │ │ │ -
532 char const sqlstate[] =
nullptr) :
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
540#if pqxx_have_source_location
│ │ │ │ -
│ │ │ │ -
542 std::string
const &err, std::string
const &Q =
"",
│ │ │ │ -
543 char const sqlstate[] =
nullptr,
│ │ │ │ -
544 std::source_location loc = std::source_location::current()) :
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
549 std::string
const &err, std::string
const &Q =
"",
│ │ │ │ -
550 char const sqlstate[] =
nullptr) :
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
561#if pqxx_have_source_location
│ │ │ │ -
│ │ │ │ -
563 std::string
const &err, std::string
const &Q =
"",
│ │ │ │ -
564 char const sqlstate[] =
nullptr,
int pos = -1,
│ │ │ │ -
565 std::source_location loc = std::source_location::current()) :
│ │ │ │ -
566 sql_error{err, Q, sqlstate, loc}, error_position{pos}
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
570 std::string
const &err, std::string
const &Q =
"",
│ │ │ │ -
571 char const sqlstate[] =
nullptr,
int pos = -1) :
│ │ │ │ -
572 sql_error{err, Q, sqlstate}, error_position{pos}
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
579#if pqxx_have_source_location
│ │ │ │ -
│ │ │ │ -
581 std::string
const &err, std::string
const &Q =
"",
│ │ │ │ -
582 char const sqlstate[] =
nullptr,
│ │ │ │ -
583 std::source_location loc = std::source_location::current()) :
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
589 std::string
const &err, std::string
const &Q =
"",
│ │ │ │ -
590 char const sqlstate[] =
nullptr) :
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
598#if pqxx_have_source_location
│ │ │ │ -
│ │ │ │ -
600 std::string
const &err, std::string
const &Q =
"",
│ │ │ │ -
601 char const sqlstate[] =
nullptr,
│ │ │ │ -
602 std::source_location loc = std::source_location::current()) :
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
608 std::string
const &err, std::string
const &Q =
"",
│ │ │ │ -
609 char const sqlstate[] =
nullptr) :
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
617#if pqxx_have_source_location
│ │ │ │ -
│ │ │ │ -
619 std::string
const &err, std::string
const &Q =
"",
│ │ │ │ -
620 char const sqlstate[] =
nullptr,
│ │ │ │ -
621 std::source_location loc = std::source_location::current()) :
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
627 std::string
const &err, std::string
const &Q =
"",
│ │ │ │ -
628 char const sqlstate[] =
nullptr) :
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
636#if pqxx_have_source_location
│ │ │ │ -
│ │ │ │ -
638 std::string
const &err, std::string
const &Q =
"",
│ │ │ │ -
639 char const sqlstate[] =
nullptr,
│ │ │ │ -
640 std::source_location loc = std::source_location::current()) :
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
645 std::string
const &err, std::string
const &Q =
"",
│ │ │ │ -
646 char const sqlstate[] =
nullptr) :
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
655#if pqxx_have_source_location
│ │ │ │ -
│ │ │ │ -
657 std::string
const &err, std::string
const &Q =
"",
│ │ │ │ -
658 char const sqlstate[] =
nullptr,
│ │ │ │ -
659 std::source_location loc = std::source_location::current()) :
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
664 std::string
const &err, std::string
const &Q =
"",
│ │ │ │ -
665 char const sqlstate[] =
nullptr) :
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
673#if pqxx_have_source_location
│ │ │ │ -
│ │ │ │ -
675 std::string
const &err, std::string
const &Q =
"",
│ │ │ │ -
676 char const sqlstate[] =
nullptr,
│ │ │ │ -
677 std::source_location loc = std::source_location::current()) :
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
682 std::string
const &err, std::string
const &Q =
"",
│ │ │ │ -
683 char const sqlstate[] =
nullptr) :
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
691#if pqxx_have_source_location
│ │ │ │ -
│ │ │ │ -
693 std::string
const &err, std::string
const &Q =
"",
│ │ │ │ -
694 char const sqlstate[] =
nullptr,
│ │ │ │ -
695 std::source_location loc = std::source_location::current()) :
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
700 std::string
const &err, std::string
const &Q =
"",
│ │ │ │ -
701 char const sqlstate[] =
nullptr) :
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
709#if pqxx_have_source_location
│ │ │ │ -
│ │ │ │ -
711 std::string
const &err,
│ │ │ │ -
712 std::source_location loc = std::source_location::current()) :
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
727#if pqxx_have_source_location
│ │ │ │ -
│ │ │ │ -
729 std::string
const &err, std::string
const &Q =
"",
│ │ │ │ -
730 char const sqlstate[] =
nullptr,
│ │ │ │ -
731 std::source_location loc = std::source_location::current()) :
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
736 std::string
const &err, std::string
const &Q =
"",
│ │ │ │ -
737 char const sqlstate[] =
nullptr) :
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
746#if pqxx_have_source_location
│ │ │ │ -
│ │ │ │ -
748 std::string
const &err, std::string
const &Q =
"",
│ │ │ │ -
749 char const sqlstate[] =
nullptr,
│ │ │ │ -
750 std::source_location loc = std::source_location::current()) :
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
755 std::string
const &err, std::string
const &Q =
"",
│ │ │ │ -
756 char const sqlstate[] =
nullptr) :
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
764#if pqxx_have_source_location
│ │ │ │ -
│ │ │ │ -
766 std::string
const &err, std::string
const &Q =
"",
│ │ │ │ -
767 char const sqlstate[] =
nullptr,
│ │ │ │ -
768 std::source_location loc = std::source_location::current()) :
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
773 std::string
const &err, std::string
const &Q =
"",
│ │ │ │ -
774 char const sqlstate[] =
nullptr) :
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
782#if pqxx_have_source_location
│ │ │ │ -
│ │ │ │ -
784 std::string
const &err, std::string
const &Q =
"",
│ │ │ │ -
785 char const sqlstate[] =
nullptr,
│ │ │ │ -
786 std::source_location loc = std::source_location::current()) :
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
791 std::string
const &err, std::string
const &Q =
"",
│ │ │ │ -
792 char const sqlstate[] =
nullptr) :
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ +
│ │ │ │ +
300 static std::enable_if_t<nullness<T>::always_null, std::size_t>
│ │ │ │ +
301 estimate_buffer(T
const &)
│ │ │ │ +
│ │ │ │ +
303 return std::size(null_field);
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
311 static std::enable_if_t<not nullness<T>::always_null, std::size_t>
│ │ │ │ +
312 estimate_buffer(T
const &field)
│ │ │ │ +
│ │ │ │ +
314 return is_null(field) ? std::size(null_field) : size_buffer(field);
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
318 void escape_field_to_buffer(std::string_view data);
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
327 template<
typename Field>
│ │ │ │ +
328 std::enable_if_t<not nullness<Field>::always_null>
│ │ │ │ +
329 append_to_buffer(Field
const &f)
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
337 m_buffer.append(null_field);
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
343 using traits = string_traits<Field>;
│ │ │ │ +
344 auto const budget{estimate_buffer(f)};
│ │ │ │ +
345 auto const offset{std::size(m_buffer)};
│ │ │ │ +
│ │ │ │ +
347 if constexpr (std::is_arithmetic_v<Field>)
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
355 auto const total{offset + budget};
│ │ │ │ +
356 m_buffer.resize(total);
│ │ │ │ +
357 auto const data{m_buffer.data()};
│ │ │ │ +
358 char *
const end{traits::into_buf(data + offset, data + total, f)};
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
361 m_buffer.resize(
static_cast<std::size_t
>(end - data));
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
364 std::is_same_v<Field, std::string> or
│ │ │ │ +
365 std::is_same_v<Field, std::string_view> or
│ │ │ │ +
366 std::is_same_v<Field, zview>)
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
369 m_field_buf.resize(budget);
│ │ │ │ +
370 escape_field_to_buffer(f);
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
373 std::is_same_v<Field, std::optional<std::string>> or
│ │ │ │ +
374 std::is_same_v<Field, std::optional<std::string_view>> or
│ │ │ │ +
375 std::is_same_v<Field, std::optional<zview>>)
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
379 m_field_buf.resize(budget);
│ │ │ │ +
380 escape_field_to_buffer(f.value());
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
384 std::is_same_v<Field, std::unique_ptr<std::string>> or
│ │ │ │ +
385 std::is_same_v<Field, std::unique_ptr<std::string_view>> or
│ │ │ │ +
386 std::is_same_v<Field, std::unique_ptr<zview>> or
│ │ │ │ +
387 std::is_same_v<Field, std::shared_ptr<std::string>> or
│ │ │ │ +
388 std::is_same_v<Field, std::shared_ptr<std::string_view>> or
│ │ │ │ +
389 std::is_same_v<Field, std::shared_ptr<zview>>)
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
394 m_field_buf.resize(budget);
│ │ │ │ +
395 escape_field_to_buffer(*f);
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
401 m_field_buf.resize(budget);
│ │ │ │ +
402 auto const data{m_field_buf.data()};
│ │ │ │ +
403 escape_field_to_buffer(
│ │ │ │ +
404 traits::to_buf(data, data + std::size(m_field_buf), f));
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
416 template<
typename Field>
│ │ │ │ +
417 std::enable_if_t<nullness<Field>::always_null>
│ │ │ │ +
418 append_to_buffer(Field
const &)
│ │ │ │ +
│ │ │ │ +
420 m_buffer.append(null_field);
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
424 template<
typename Container>
│ │ │ │ +
425 std::enable_if_t<not std::is_same_v<typename Container::value_type, char>>
│ │ │ │ +
426 fill_buffer(Container
const &c)
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
431 std::size_t budget{0};
│ │ │ │ +
432 for (
auto const &f : c) budget += estimate_buffer(f);
│ │ │ │ +
433 m_buffer.reserve(budget);
│ │ │ │ +
434 for (
auto const &f : c) append_to_buffer(f);
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
438 template<
typename Tuple, std::size_t... indexes>
│ │ │ │ +
│ │ │ │ +
440 budget_tuple(Tuple
const &t, std::index_sequence<indexes...>)
│ │ │ │ +
│ │ │ │ +
442 return (estimate_buffer(std::get<indexes>(t)) + ...);
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
446 template<
typename Tuple, std::size_t... indexes>
│ │ │ │ +
447 void append_tuple(Tuple
const &t, std::index_sequence<indexes...>)
│ │ │ │ +
│ │ │ │ +
449 (append_to_buffer(std::get<indexes>(t)), ...);
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
453 template<
typename... Elts>
void fill_buffer(std::tuple<Elts...>
const &t)
│ │ │ │ +
│ │ │ │ +
455 using indexes = std::make_index_sequence<
sizeof...(Elts)>;
│ │ │ │ +
│ │ │ │ +
457 m_buffer.reserve(budget_tuple(t, indexes{}));
│ │ │ │ +
458 append_tuple(t, indexes{});
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
462 template<
typename... Ts>
void fill_buffer(
const Ts &...fields)
│ │ │ │ +
│ │ │ │ +
464 (..., append_to_buffer(fields));
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
467 constexpr static std::string_view s_classname{
"stream_to"};
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
471template<
typename Columns>
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
473 transaction_base &tx, std::string_view table_name, Columns
const &columns) :
│ │ │ │ +
474 stream_to{tx, table_name, std::begin(columns), std::end(columns)}
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
478template<
typename Iter>
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │
The home of all libpqxx classes, functions, templates, etc.
Definition array.hxx:33
│ │ │ │ -
Run-time failure encountered by libpqxx, similar to std::runtime_error.
Definition except.hxx:48
│ │ │ │ -
Exception class for lost or failed backend connection.
Definition except.hxx:81
│ │ │ │ -
Exception class for micommunication with the server.
Definition except.hxx:103
│ │ │ │ -
The caller attempted to set a variable to null, which is not allowed.
Definition except.hxx:116
│ │ │ │ -
Exception class for failed queries.
Definition except.hxx:132
│ │ │ │ -
virtual ~sql_error() noexcept override
│ │ │ │ -
"Help, I don't know whether transaction was committed successfully!"
Definition except.hxx:165
│ │ │ │ -
The backend saw itself forced to roll back the ongoing transaction.
Definition except.hxx:178
│ │ │ │ -
Transaction failed to serialize. Please retry it.
Definition except.hxx:200
│ │ │ │ -
We can't tell whether our last statement succeeded.
Definition except.hxx:214
│ │ │ │ -
The ongoing transaction has deadlocked. Retrying it may help.
Definition except.hxx:228
│ │ │ │ -
Internal error in libpqxx library.
Definition except.hxx:242
│ │ │ │ -
Error in usage of libpqxx library, similar to std::logic_error.
Definition except.hxx:249
│ │ │ │ -
Invalid argument passed to libpqxx, similar to std::invalid_argument.
Definition except.hxx:266
│ │ │ │ -
Value conversion failed, e.g. when converting "Hello" to int.
Definition except.hxx:283
│ │ │ │ -
Could not convert null value: target type does not support null.
Definition except.hxx:300
│ │ │ │ -
Could not convert value to string: not enough buffer space.
Definition except.hxx:313
│ │ │ │ -
Something is out of range, similar to std::out_of_range.
Definition except.hxx:326
│ │ │ │ -
Query returned an unexpected number of rows.
Definition except.hxx:343
│ │ │ │ -
unexpected_rows(std::string const &msg)
Definition except.hxx:351
│ │ │ │ -
Database feature not supported in current setup.
Definition except.hxx:358
│ │ │ │ -
feature_not_supported(std::string const &err, std::string const &Q="", char const sqlstate[]=nullptr)
Definition except.hxx:367
│ │ │ │ -
Error in data provided to SQL statement.
Definition except.hxx:377
│ │ │ │ -
data_exception(std::string const &err, std::string const &Q="", char const sqlstate[]=nullptr)
Definition except.hxx:386
│ │ │ │ -
Definition except.hxx:395
│ │ │ │ -
integrity_constraint_violation(std::string const &err, std::string const &Q="", char const sqlstate[]=nullptr)
Definition except.hxx:404
│ │ │ │ -
Definition except.hxx:413
│ │ │ │ -
restrict_violation(std::string const &err, std::string const &Q="", char const sqlstate[]=nullptr)
Definition except.hxx:422
│ │ │ │ -
Definition except.hxx:431
│ │ │ │ -
not_null_violation(std::string const &err, std::string const &Q="", char const sqlstate[]=nullptr)
Definition except.hxx:440
│ │ │ │ -
Definition except.hxx:449
│ │ │ │ -
foreign_key_violation(std::string const &err, std::string const &Q="", char const sqlstate[]=nullptr)
Definition except.hxx:458
│ │ │ │ -
Definition except.hxx:467
│ │ │ │ -
unique_violation(std::string const &err, std::string const &Q="", char const sqlstate[]=nullptr)
Definition except.hxx:476
│ │ │ │ -
Definition except.hxx:485
│ │ │ │ -
check_violation(std::string const &err, std::string const &Q="", char const sqlstate[]=nullptr)
Definition except.hxx:494
│ │ │ │ -
Definition except.hxx:503
│ │ │ │ -
invalid_cursor_state(std::string const &err, std::string const &Q="", char const sqlstate[]=nullptr)
Definition except.hxx:512
│ │ │ │ -
Definition except.hxx:521
│ │ │ │ -
invalid_sql_statement_name(std::string const &err, std::string const &Q="", char const sqlstate[]=nullptr)
Definition except.hxx:530
│ │ │ │ -
Definition except.hxx:539
│ │ │ │ -
invalid_cursor_name(std::string const &err, std::string const &Q="", char const sqlstate[]=nullptr)
Definition except.hxx:548
│ │ │ │ -
Definition except.hxx:557
│ │ │ │ -
syntax_error(std::string const &err, std::string const &Q="", char const sqlstate[]=nullptr, int pos=-1)
Definition except.hxx:569
│ │ │ │ -
int const error_position
Approximate position in string where error occurred, or -1 if unknown.
Definition except.hxx:559
│ │ │ │ -
Definition except.hxx:578
│ │ │ │ -
undefined_column(std::string const &err, std::string const &Q="", char const sqlstate[]=nullptr)
Definition except.hxx:588
│ │ │ │ -
Definition except.hxx:597
│ │ │ │ -
undefined_function(std::string const &err, std::string const &Q="", char const sqlstate[]=nullptr)
Definition except.hxx:607
│ │ │ │ -
Definition except.hxx:616
│ │ │ │ -
undefined_table(std::string const &err, std::string const &Q="", char const sqlstate[]=nullptr)
Definition except.hxx:626
│ │ │ │ -
Definition except.hxx:635
│ │ │ │ -
insufficient_privilege(std::string const &err, std::string const &Q="", char const sqlstate[]=nullptr)
Definition except.hxx:644
│ │ │ │ -
Resource shortage on the server.
Definition except.hxx:654
│ │ │ │ -
insufficient_resources(std::string const &err, std::string const &Q="", char const sqlstate[]=nullptr)
Definition except.hxx:663
│ │ │ │ -
Definition except.hxx:672
│ │ │ │ -
disk_full(std::string const &err, std::string const &Q="", char const sqlstate[]=nullptr)
Definition except.hxx:681
│ │ │ │ -
Definition except.hxx:690
│ │ │ │ -
out_of_memory(std::string const &err, std::string const &Q="", char const sqlstate[]=nullptr)
Definition except.hxx:699
│ │ │ │ -
Definition except.hxx:708
│ │ │ │ -
too_many_connections(std::string const &err)
Definition except.hxx:716
│ │ │ │ -
PL/pgSQL error.
Definition except.hxx:726
│ │ │ │ -
plpgsql_error(std::string const &err, std::string const &Q="", char const sqlstate[]=nullptr)
Definition except.hxx:735
│ │ │ │ -
Exception raised in PL/pgSQL procedure.
Definition except.hxx:745
│ │ │ │ -
plpgsql_raise(std::string const &err, std::string const &Q="", char const sqlstate[]=nullptr)
Definition except.hxx:754
│ │ │ │ -
Definition except.hxx:763
│ │ │ │ -
plpgsql_no_data_found(std::string const &err, std::string const &Q="", char const sqlstate[]=nullptr)
Definition except.hxx:772
│ │ │ │ -
Definition except.hxx:781
│ │ │ │ -
plpgsql_too_many_rows(std::string const &err, std::string const &Q="", char const sqlstate[]=nullptr)
Definition except.hxx:790
│ │ │ │ +
std::string separated_list(std::string_view sep, ITER begin, ITER end, ACCESS access)
Represent sequence of values as a string, joined by a given separator.
Definition separated_list.hxx:44
│ │ │ │ +
std::basic_ostream< CHAR > & operator<<(std::basic_ostream< CHAR > &s, field const &value)
Write a result field to any type of stream.
Definition field.hxx:509
│ │ │ │ +
std::initializer_list< std::string_view > table_path
Representation of a PostgreSQL table path.
Definition connection.hxx:188
│ │ │ │ +
Reference to one row in a result.
Definition row.hxx:47
│ │ │ │ +
Stream data from the database.
Definition stream_from.hxx:79
│ │ │ │ +
Efficiently write data directly to a database table.
Definition stream_to.hxx:81
│ │ │ │ +
static stream_to raw_table(transaction_base &tx, std::string_view path, std::string_view columns="")
Stream data to a pre-quoted table and columns.
Definition stream_to.hxx:104
│ │ │ │ +
constexpr bool operator!() const noexcept
Has this stream been through its concluding complete()?
Definition stream_to.hxx:211
│ │ │ │ +
static stream_to table(transaction_base &tx, table_path path, std::initializer_list< std::string_view > columns={})
Create a stream_to writing to a named table and columns.
Definition stream_to.hxx:120
│ │ │ │ +
void write_values(Ts const &...fields)
Insert values as a row.
Definition stream_to.hxx:265
│ │ │ │ +
stream_to(transaction_base &tx, std::string_view table_name)
Create a stream, without specifying columns.
Definition stream_to.hxx:172
│ │ │ │ +
stream_to(stream_to &&other)
Definition stream_to.hxx:192
│ │ │ │ +
stream_to & operator<<(Row const &row)
Insert a row of data.
Definition stream_to.hxx:235
│ │ │ │ +
void write_row(Row const &row)
Insert a row of data, given in the form of a std::tuple or container.
Definition stream_to.hxx:255
│ │ │ │ +
Interface definition (and common code) for "transaction" classes.
Definition transaction_base.hxx:88
│ │ │ │ +
constexpr connection & conn() const noexcept
The connection in which this transaction lives.
Definition transaction_base.hxx:780
│ │ │ │ +
std::string quote_name(std::string_view identifier) const
Escape an SQL identifier for use in a query.
Definition transaction_base.hxx:231
│ │ │ │ +
Base class for things that monopolise a transaction's attention.
Definition transaction_focus.hxx:29
│ │ │ │