...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
Reads metadata for subsequent resultsets in a multi-resultset operation.
template< classExecutionStateType
, class CompletionToken> auto async_read_resultset_head( ExecutionStateType& st,diagnostics
& diag, CompletionToken&& token);
If st.should_read_head()
== true
,
this function will read the next resultset's initial response message
and metadata, if any. If the resultset indicates a failure (e.g. the
query associated to this resultset contained an error), this function
will fail with that error.
If st.should_read_head()
== false
,
this function is a no-op.
st
may be either an
execution_state
or static_execution_state
object.
This function is only relevant when using multi-function operations with statements that return more than one resultset.
When using the static interface, this function will detect schema mismatches
for the resultset currently being read. Further errors may be detected
by subsequent invocations of this function and by read_some_rows
.
The handler signature for this operation is void(boost::mysql::error_code)
.
Intermediate completion handlers, as well as the final handler, are executed
using token
's associated
executor, or this->get_executor()
if the token doesn't have an associated executor.
If the final handler has an associated immediate executor, and the operation
completes immediately, the final handler is dispatched to it. Otherwise,
the final handler is called as if it was submitted using asio::post
, and is never be called inline
from within this function.