pqxx::prepare Namespace Reference

## Functions

template<typename IT >
constexpr auto | make_dynamic_params (IT begin, IT end)
| Pass a number of statement parameters only known at runtime.
template<typename C >
constexpr auto | make_dynamic_params (C const &container)
| Pass a number of statement parameters only known at runtime.
template<typename C , typename ACCESSOR >
constexpr auto | make_dynamic_params (C &container, ACCESSOR accessor)
| Pass a number of statement parameters only known at runtime.

## Detailed Description

Deprecated:
  The new params class replaces all of this.

## Function Documentation

## make_dynamic_params() [1/3]

template<typename C , typename ACCESSOR >

constexpr auto pqxx::prepare::make_dynamic_params | ( | C & | container,
|  | ACCESSOR | accessor
| ) |  |

constexpr

Pass a number of statement parameters only known at runtime.

Deprecated:
  Use params instead.

When you call any of the `exec_params` functions, the number of arguments is normally known at compile time. This helper function supports the case where it is not.

Use this function to pass a variable number of parameters, based on a container of parameter values.

The technique combines with the regular static parameters. You can use it to insert dynamic parameter lists in any place, or places, among the call's parameters. You can even insert multiple dynamic containers.

Parameters

  container | A container of parameter values.
  accessor | For each parameter `p`, pass `accessor(p)`.

Returns
  An object representing the parameters.

## make_dynamic_params() [2/3]

template<typename C >

constexpr auto pqxx::prepare::make_dynamic_params | ( | C const & | container | ) |

constexpr

Pass a number of statement parameters only known at runtime.

Deprecated:
  Use params instead.

When you call any of the `exec_params` functions, the number of arguments is normally known at compile time. This helper function supports the case where it is not.

Use this function to pass a variable number of parameters, based on a container of parameter values.

The technique combines with the regular static parameters. You can use it to insert dynamic parameter lists in any place, or places, among the call's parameters. You can even insert multiple dynamic containers.

Parameters

  container | A container of parameter values.

Returns
  An object representing the parameters.

## make_dynamic_params() [3/3]

template<typename IT >

constexpr auto pqxx::prepare::make_dynamic_params | ( | IT | begin,
|  | IT | end
| ) |  |

constexpr

Pass a number of statement parameters only known at runtime.

Deprecated:
  Use params instead.

When you call any of the `exec_params` functions, the number of arguments is normally known at compile time. This helper function supports the case where it is not.

Use this function to pass a variable number of parameters, based on a sequence ranging from `begin` to `end` exclusively.

The technique combines with the regular static parameters. You can use it to insert dynamic parameter lists in any place, or places, among the call's parameters. You can even insert multiple dynamic sequences.

Parameters

  begin | A pointer or iterator for iterating parameters.
  end | A pointer or iterator for iterating parameters.

Returns
  An object representing the parameters.