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 a snapshot of the develop branch, built from commit f8f3d75ae3.
PrevUpHomeNext

row

An owning, read-only sequence of fields.

Synopsis

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

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

as_vector

Converts the row into a std::vector of field's.

at

Returns the i-th element in the row or throws an exception.

back

Returns the last element in the row.

begin

Returns an iterator to the first field in the row.

empty

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

end

Returns an iterator to one-past-the-last field in the row.

front

Returns the first element in the row.

operator=

Copy assignment.

Move assignment.

Replaces the contents with a row_view.

operator[]

Returns the i-th element in the row (unchecked access).

operator row_view

Creates a row_view that references *this.

row [constructor]

Constructs an empty row.

Copy constructor.

Move constructor.

Constructs a row from a row_view.

size

Returns the number of fields in the row.

~row [destructor]

Destructor.

Related Functions

Name

Description

operator==

Equality operator.

operator!=

Inequality operator.

Description

Although owning, row is read-only. It's optimized for memory re-use. If you need to mutate fields, use a std::vector<field> instead (see row_view::as_vector and row::as_vector).

Object lifetimes

A row object owns a chunk of memory in which it stores its elements. On element access (using iterators, row::at or row::operator[]) it returns field_view's pointing into the row's internal storage. These views behave like references, and are valid as long as pointers, iterators and references into the row remain valid.


PrevUpHomeNext