13 #ifndef PQXX_H_STATEMENT_PARAMETER
14 #define PQXX_H_STATEMENT_PARAMETER
28 template<
typename ITERATOR>
30 [](decltype(*std::declval<ITERATOR>()) x) {
return x; }};
34 template<
typename IT,
typename ACCESSOR = decltype(iterator_
identity<IT>)>
49 m_begin(begin), m_end(end), m_accessor(acc)
55 dynamic_params(std::
begin(container), std::
end(container))
65 dynamic_params(std::
begin(container), std::
end(container), acc)
68 constexpr IT
begin() const noexcept {
return m_begin; }
69 constexpr IT
end() const noexcept {
return m_end; }
71 constexpr
auto access(decltype(*std::declval<IT>()) value) const
72 -> decltype(std::declval<ACCESSOR>()(value))
74 return m_accessor(value);
78 IT
const m_begin, m_end;
79 ACCESSOR m_accessor = iterator_identity<IT>;
102 void reserve(std::size_t n) &;
constexpr auto access(decltype(*std::declval< IT >()) value) const -> decltype(std::declval< ACCESSOR >()(value))
Definition: statement_parameters.hxx:71
std::vector< char const * > values
As used by libpq: pointers to parameter values.
Definition: statement_parameters.hxx:105
Definition: statement_parameters.hxx:35
Internal items for libpqxx' own use. Do not use these yourself.
Definition: encodings.cxx:32
constexpr dynamic_params(C &container)
Wrap a container.
Definition: statement_parameters.hxx:54
constexpr dynamic_params(IT begin, IT end, ACCESSOR &acc)
Wrap a sequence of pointers or iterators.
Definition: statement_parameters.hxx:48
std::vector< int > lengths
As used by libpq: lengths of non-null arguments, in bytes.
Definition: statement_parameters.hxx:107
constexpr IT end() const noexcept
Definition: statement_parameters.hxx:69
std::vector< format > formats
As used by libpq: effectively boolean "is this a binary parameter?".
Definition: statement_parameters.hxx:109
Internal type: encode statement parameters.
Definition: statement_parameters.hxx:94
constexpr dynamic_params(C &container, ACCESSOR &acc)
Wrap a container.
Definition: statement_parameters.hxx:64
constexpr dynamic_params(IT begin, IT end)
Wrap a sequence of pointers or iterators.
Definition: statement_parameters.hxx:39
constexpr IT begin() const noexcept
Definition: statement_parameters.hxx:68
constexpr auto const iterator_identity
Definition: statement_parameters.hxx:29