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::start_query (2 of 2 overloads)

Starts a text query as a multi-function operation.

Synopsis
void
start_query(
    string_view query_string,
    execution_state& st);
Description

Writes the query request and reads the initial server response and the column metadata, but not the generated rows, if any. After this operation completes, st will have execution_state::meta populated, and may become execution_state::complete if the operation did not generate any rows (e.g. it was an UPDATE). Metadata will be populated according to this->meta_mode().

If the operation generated any rows, these must be read (by using read_some_rows) before engaging in any further network operation. Otherwise, the results are undefined.

query_stringshould be encoded using the connection's character set.


PrevUpHomeNext