Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext
connection::async_start_statement_execution (3 of 4 overloads)

(Deprecated) Starts a statement execution as a multi-function operation.

Synopsis
template<
    class FieldViewFwdIterator,
    class CompletionToken>
auto
async_start_statement_execution(
    const statement& stmt,
    FieldViewFwdIterator params_first,
    FieldViewFwdIterator params_last,
    execution_state& st,
    CompletionToken&& token);
Description

Writes the execute request and reads the initial server response and the column metadata, but not the generated rows or any subsequent resultsets, if any. After this operation completes, st will have execution_state::meta populated.

If the operation generated any rows or more than one resultset, these must be read (by using read_some_rows and read_resultset_head) before engaging in any further network operation. Otherwise, the results are undefined.

The statement actual parameters are passed as an iterator range. String parameters should be encoded using the connection's character set.

Deprecation notice

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

Preconditions

stmt.valid() == true

Object lifetimes

If CompletionToken is deferred (like use_awaitable), the caller must keep objects in the iterator range alive until the operation is initiated.

Handler signature

The handler signature for this operation is void(boost::mysql::error_code).


PrevUpHomeNext