Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of boost. Click here for the latest Boost documentation.
PrevUpHomeNext
connection::execute_statement (2 of 2 overloads)

Executes a prepared statement.

Synopsis
template<
    class FieldLikeTuple,
    class EnableIf = detail::enable_if_field_like_tuple<FieldLikeTuple>>
void
execute_statement(
    const statement& stmt,
    const FieldLikeTuple& params,
    results& result);
Description

Executes a statement with the given parameters and reads the response into result.

After this operation completes successfully, result.has_value() == true.

The statement actual parameters (params) are passed as a std::tuple of elements. See the FieldLikeTuple concept defition for more info. You should pass exactly as many parameters as this->num_params(), or the operation will fail with an error. String parameters should be encoded using the connection's character set.

Metadata in result will be populated according to conn.meta_mode(), where conn is the connection that prepared this statement.

Preconditions

stmt.valid() == true


PrevUpHomeNext