Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext
connection::execute_statement (1 of 2 overloads)

(Deprecated) Executes a prepared statement.

Synopsis
template<
    class WritableFieldTuple,
    class EnableIf = typename std::enable_if<detail::is_writable_field_tuple<WritableFieldTuple>::value>::type>
void
execute_statement(
    const statement& stmt,
    const WritableFieldTuple& params,
    results& result,
    error_code& err,
    diagnostics& diag);
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 WritableFieldTuple 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.

Deprecation notice

This function is only provided for backwards-compatibility. For new code, please use execute or async_execute instead.

Preconditions

stmt.valid() == true


PrevUpHomeNext