11#ifndef PQXX_H_SEPARATED_LIST
12#define PQXX_H_SEPARATED_LIST
14#if !defined(PQXX_HEADER_PRE)
15# error "Include libpqxx headers as <pqxx/header>, not <pqxx/header.hxx>."
21#include "pqxx/strconv.hxx"
42template<
typename ITER,
typename ACCESS>
61 static_cast<std::size_t
>(std::distance(begin, end)) * std::size(
sep);
66 char *
const data{
result.data()};
70 for (++begin; begin != end; ++begin)
75 result.resize(
static_cast<std::size_t
>(
here - data));
81template<
typename ITER>
91template<
typename CONTAINER>
99 ->
typename std::enable_if<
100 (
not std::is_void<
decltype(std::begin(
c))>::value
and
101 not std::is_void<
decltype(std::end(
c))>::value),
111 typename std::enable_if<
112 (
INDEX == std::tuple_size<TUPLE>::value - 1),
int>::type = 0>
121 typename std::enable_if<
134 typename std::enable_if<
The home of all libpqxx classes, functions, templates, etc.
Definition array.hxx:33
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
constexpr char array_separator
Element separator between SQL array elements of this type.
Definition strconv.hxx:557
std::remove_cv_t< std::remove_reference_t< TYPE > > strip_t
Remove any constness, volatile, and reference-ness from a type.
Definition types.hxx:78
std::string to_string(field const &value)
Convert a field to a string.
Definition result.cxx:566
Result set containing data returned by a query or command.
Definition result.hxx:73
Traits class for use in string conversions.
Definition strconv.hxx:153