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

PrevUpHomeNext
connection::async_start_query (2 of 2 overloads)

(Deprecated - will be removed in Boost 1.86) Starts a text query as a multi-function operation.

Synopsis
template<
    class CompletionToken>
auto
async_start_query(
    string_view query_string,
    execution_state& st,
    diagnostics& diag,
    CompletionToken&& token);
Description

Writes the query request and reads the initial server response and the column metadata, but not the generated rows or subsequent resultsets, if any. After this operation completes, st will have execution_state::meta populated. Metadata will be populated according to this->meta_mode().

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.

query_stringshould be encoded using the connection's character set.

Deprecation warning

This function is deprecated and will be removed in Boost 1.86. Please use execute or async_execute instead.

Object lifetimes

If CompletionToken is a deferred completion token (e.g. use_awaitable), the string pointed to by query_string must be kept alive by the caller until the operation is initiated.

Handler signature

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


PrevUpHomeNext