13#ifndef PQXX_H_STATEMENT_PARAMETER
14#define PQXX_H_STATEMENT_PARAMETER
28template<
typename ITERATOR>
30 [](
decltype(*std::declval<ITERATOR>()) x) {
return x; }};
34template<
typename IT,
typename ACCESSOR = decltype(iterator_
identity<IT>)>
49 m_begin(
begin), m_end(
end), m_accessor(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;
constexpr dynamic_params(C &container)
Wrap a container.
Definition statement_parameters.hxx:54
constexpr dynamic_params(IT begin, IT end)
Wrap a sequence of pointers or iterators.
Definition statement_parameters.hxx:39
constexpr auto access(decltype(*std::declval< IT >()) value) const -> decltype(std::declval< ACCESSOR >()(value))
Definition statement_parameters.hxx:71
constexpr dynamic_params(C &container, ACCESSOR &acc)
Wrap a container.
Definition statement_parameters.hxx:64
constexpr IT begin() const noexcept
Definition statement_parameters.hxx:68
constexpr IT end() const noexcept
Definition statement_parameters.hxx:69
constexpr dynamic_params(IT begin, IT end, ACCESSOR &acc)
Wrap a sequence of pointers or iterators.
Definition statement_parameters.hxx:48
Internal items for libpqxx' own use. Do not use these yourself.
Definition encodings.cxx:33
constexpr auto const iterator_identity
Definition statement_parameters.hxx:29
c_params(c_params &&)=default
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:107
std::vector< format > formats
As used by libpq: effectively boolean "is this a binary parameter?".
Definition statement_parameters.hxx:109
void reserve(std::size_t n) &
Pre-allocate storage for n parameters.
Definition params.cxx:18
std::vector< char const * > values
As used by libpq: pointers to parameter values.
Definition statement_parameters.hxx:105