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

stage_response
PrevUpHomeNext

(EXPERIMENTAL) A variant-like type holding the response of a single pipeline stage.

Synopsis

Defined in header <boost/mysql/pipeline.hpp>

class stage_response
Member Functions

Name

Description

as_results

Retrieves the contained results or throws an exception.
—
Retrieves the contained results or throws an exception.

as_statement

Retrieves the contained statement or throws an exception.

diag

Retrieves the contained diagnostics (lvalue reference accessor).
—
Retrieves the contained diagnostics (rvalue reference accessor).

error

Retrieves the contained error code.

get_results

Retrieves the contained results (unchecked accessor).
—
Retrieves the contained results (unchecked accessor).

get_statement

Retrieves the contained statement (unchecked accessor).

has_results

Returns true if the object contains a results.

has_statement

Returns true if the object contains a statement.

stage_response [constructor]

Default constructor.

Description

This is a variant-like type, similar to boost::system::result. At any point in time, it can contain:

  • A statement. Will happen if the stage was a prepare statement that succeeded.
  • A results. Will happen if the stage was a query or statement execution that succeeded.
  • An error_code, diagnostics pair. Will happen if the stage failed, or if it succeeded but it doesn't yield a value (as in close statement, reset connection and set character set).
Experimental

This part of the API is experimental, and may change in successive releases without previous notice.


PrevUpHomeNext