Loading...
Searching...
No Matches
pqxx::internal::c_params Struct Reference

Internal type: encode statement parameters. More...

## Public Member Functions

| c_params (c_params const &)=delete
| Copying these objects is pointless and expensive. Don't do it.
| c_params (c_params &&)=default
void | reserve (std::size_t n) &
| Pre-allocate storage for `n` parameters.

## Public Attributes

std::vector< char const * > | values
| As used by libpq: pointers to parameter values.
std::vector< int > | lengths
| As used by libpq: lengths of non-null arguments, in bytes.
std::vector< format > | formats
| As used by libpq: effectively boolean "is this a binary parameter?".

## Detailed Description

Internal type: encode statement parameters.

Compiles arguments for prepared statements and parameterised queries into a format that can be passed into libpq.

Objects of this type are meant to be short-lived: a `c_params` lives and dies entirely within the call to execute. So, for example, if you pass in a non-null pointer as a parameter, params may simply use that pointer as a parameter value, without arranging longer-term storage for the data to which it points. All values referenced by parameters must remain "live" until the parameterised or prepared statement has been executed.

The documentation for this struct was generated from the following files:

- /build/libpqxx-dRO3di/libpqxx-7.10.0/include/pqxx/internal/statement_parameters.hxx
- /build/libpqxx-dRO3di/libpqxx-7.10.0/src/params.cxx