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 to view this page for the latest version.
PrevUpHomeNext

rows

An owning, read-only sequence of rows.

Synopsis

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

class rows
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

at

Returns the i-th row or throws an exception.

back

Returns the last row.

begin

Returns an iterator to the first element in the collection.

empty

Returns true if there are no rows in the collection (i.e. this->size() == 0)

end

Returns an iterator to one-past-the-last element in the collection.

front

Returns the first row.

num_columns

Returns the number of elements each row in the collection has.

operator=

Copy assignment.

Move assignment.

Replaces the contents with a rows_view.

operator[]

Returns the i-th row (unchecked access).

operator rows_view

Creates a rows_view that references *this.

rows [constructor]

Construct an empty rows object.

Copy constructor.

Move constructor.

Constructs a rows object from a rows_view.

size

Returns the number of rows in the collection.

~rows [destructor]

Destructor.

Related Functions

Name

Description

operator==

Equality operator.

operator!=

Inequality operator.

Description

Models an owning, matrix-like container. Indexing a rows object (by using iterators, rows::at or rows::operator[]) returns a row_view object, representing a single row. All rows in the collection are the same size (as given by num_columns).

A rows object owns a chunk of memory in which it stores its elements. The rows_view objects obtained on element access point into the rows' internal storage. These views (and any row_view and field_view obtained from the former) behave like references, and are valid as long as pointers, iterators and references into the rows object remain valid.

Although owning, rows is read-only. It's optimized for memory re-use.

Convenience header <boost/mysql.hpp>


PrevUpHomeNext