| Home | Libraries | People | FAQ | More

#### static_execution_state

Holds state for multi-function SQL execution operations (static interface).

##### Synopsis

Defined in header `<boost/mysql/static_execution_state.hpp>`

    template<
        class... StaticRow>
    class static_execution_state;

##### Member Functions

Name | Description
--- | ---
affected_rows | Returns the number of rows affected by the SQL statement associated to this resultset. Note that this is NOT the number of matched rows. If a row is matched but not affected, it won't be accounted for here.
complete | Returns whether all the messages generated by this operation have been read.
info | Returns additional text information about this resultset.
is_out_params | Returns whether the current resultset represents a procedure OUT params.
last_insert_id | Returns the last insert ID produced by the SQL statement associated to this resultset.
meta | Returns metadata about the columns in the query.
operator= | Copy assignment. — Move assignment.
should_read_head | Returns whether the next operation should be read resultset head.
should_read_rows | Returns whether the next operation should be read some rows.
should_start_op | Returns whether `*this` is in the initial state.
static_execution_state [constructor] | Default constructor. — Copy constructor. — Move constructor.
warning_count | Returns the number of warnings produced by the SQL statement associated to this resultset.

##### Description

This class behaves like a state machine. The current state can be accessed using `should_start_op`, `should_read_rows`, `should_read_head` and `complete`. They are mutually exclusive. More states may be added in the future as more protocol features are implemented.

Note that this class doesn't store rows anyhow. Row template parameters are used to validate their compatibility with the data that will be returned by the server.

##### Template Parameters

Type | Description
--- | ---
`StaticRow` | The row or row types that will be returned by the server. There must be one for every resultset returned by the query, and always at least one. All the passed types must fulfill the `StaticRow` concept.

##### Thread safety

Distinct objects: safe.

Shared objects: unsafe.

Convenience header `<boost/mysql.hpp>`