Helper class for passing parameters to, and executing, prepared statements.
More...
#include <prepared_statement.hxx>
Helper class for passing parameters to, and executing, prepared statements.
- Deprecated:
- As of 6.0, use
transaction_base::exec_prepared
and friends.
◆ invocation()
pqxx::prepare::invocation::invocation |
( |
transaction_base & |
home, |
|
|
const std::string & |
statement |
|
) |
| |
◆ exec()
◆ exists()
bool pqxx::prepare::invocation::exists |
( |
| ) |
const |
◆ operator()() [1/7]
invocation& pqxx::prepare::invocation::operator() |
( |
| ) |
|
◆ operator()() [2/7]
template<typename T >
invocation& pqxx::prepare::invocation::operator() |
( |
const T & |
v | ) |
|
Pass parameter value.
- Parameters
-
v | parameter value; will be represented as a string internally. |
◆ operator()() [3/7]
Pass binary parameter value for a BYTEA field.
- Parameters
-
v | binary string; will be passed on directly in binary form. |
◆ operator()() [4/7]
template<typename T >
invocation& pqxx::prepare::invocation::operator() |
( |
const T & |
v, |
|
|
bool |
nonnull |
|
) |
| |
Pass parameter value.
- Parameters
-
v | parameter value (will be represented as a string internally). |
nonnull | replaces value with null if set to false. |
◆ operator()() [5/7]
Pass binary parameter value for a BYTEA field.
- Parameters
-
v | binary string; will be passed on directly in binary form. |
nonnull | determines whether to pass a real value, or nullptr. |
◆ operator()() [6/7]
template<typename T >
invocation& pqxx::prepare::invocation::operator() |
( |
T * |
v, |
|
|
bool |
nonnull = true |
|
) |
| |
Pass C-style parameter string, or null if pointer is null.
This version is for passing C-style strings; it's a template, so any pointer type that to_string
accepts will do.
- Parameters
-
v | parameter value (will be represented as a C++ string internally) |
nonnull | replaces value with null if set to false |
◆ operator()() [7/7]
invocation& pqxx::prepare::invocation::operator() |
( |
const char * |
v, |
|
|
bool |
nonnull = true |
|
) |
| |
Pass C-style string parameter, or null if pointer is null.
This duplicates the pointer-to-template-argument-type version of the operator, but helps compilers with less advanced template implementations disambiguate calls where C-style strings are passed.
◆ operator=()
The documentation for this class was generated from the following files: