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

results

Holds the results of a SQL query (dynamic interface).

Synopsis

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

class results
Types

Name

Description

const_iterator

A random access iterator to an element.

const_reference

The reference type.

difference_type

A signed integer type used to represent differences.

iterator

A random access iterator to an element.

reference

The reference type.

size_type

An unsigned integer type to represent sizes.

value_type

A type that can hold elements in this collection with value semantics.

Member Functions

Name

Description

affected_rows

Returns the number of rows affected by the executed SQL statement.

at

Returns the i-th resultset or throws an exception.

back

Returns the last resultset.

begin

Returns an iterator pointing to the first resultset that this object contains.

empty

Returns whether the collection contains any resultset.

end

Returns an iterator pointing to one-past-the-last resultset that this object contains.

front

Returns the first resultset.

has_value

Returns whether the object holds a valid result.

info

Returns additional text information about the execution of the SQL statement.

last_insert_id

Returns the last insert ID produced by the executed SQL statement.

meta

Returns metadata about the columns in the query.

operator=

Copy assignment.

Move assignment.

operator[]

Returns the i-th resultset (unchecked access).

out_params

Returns the output parameters of a stored procedure call.

results [constructor]

Default constructor.

Copy constructor.

Move constructor.

rows

Returns the rows retrieved by the SQL query.

size

Returns the number of resultsets that this collection contains.

warning_count

Returns the number of warnings produced by the executed SQL statement.

~results [destructor]

Destructor.

Description

This object can store the results of single and multi resultset queries. For the former, you use meta, rows, affected_rows and so on. For the latter, this class is a random-access collection of resultset objects.

Thread safety

Distinct objects: safe.

Shared objects: unsafe.


PrevUpHomeNext