13#ifndef PQXX_H_STATEMENT_PARAMETER
14#define PQXX_H_STATEMENT_PARAMETER
21#include "pqxx/binarystring.hxx"
22#include "pqxx/strconv.hxx"
23#include "pqxx/util.hxx"
28template<
typename ITERATOR>
29constexpr inline auto const iterator_identity{
30 [](
decltype(*std::declval<ITERATOR>())
x) {
return x; }};
52template<
typename IT,
typename ACCESSOR = decltype(iterator_
identity<IT>)>
58 m_begin(begin), m_end(end), m_accessor(iterator_identity<
IT>)
67 m_begin(begin), m_end(end), m_accessor(
acc)
89 constexpr auto access(
decltype(*std::declval<IT>()) value)
const
90 ->
decltype(std::declval<ACCESSOR>()(value))
92 return m_accessor(value);
96 IT const m_begin, m_end;
120 void reserve(std::size_t n) &;
Marker type: pass a dynamically-determined number of statement parameters.
Definition statement_parameters.hxx:54
constexpr dynamic_params(C &container)
Wrap a container.
Definition statement_parameters.hxx:72
constexpr dynamic_params(IT begin, IT end)
Wrap a sequence of pointers or iterators.
Definition statement_parameters.hxx:57
constexpr dynamic_params(C &container, ACCESSOR &acc)
Wrap a container.
Definition statement_parameters.hxx:82
constexpr dynamic_params(IT begin, IT end, ACCESSOR &acc)
Wrap a sequence of pointers or iterators.
Definition statement_parameters.hxx:66
Internal items for libpqxx' own use. Do not use these yourself.
Definition encodings.cxx:33
constexpr char array_separator
Element separator between SQL array elements of this type.
Definition strconv.hxx:558
Internal type: encode statement parameters.
Definition statement_parameters.hxx:113
c_params(c_params const &)=delete
Copying these objects is pointless and expensive. Don't do it.
std::vector< int > lengths
As used by libpq: lengths of non-null arguments, in bytes.
Definition statement_parameters.hxx:125
std::vector< format > formats
As used by libpq: effectively boolean "is this a binary parameter?".
Definition statement_parameters.hxx:127
std::vector< char const * > values
As used by libpq: pointers to parameter values.
Definition statement_parameters.hxx:123