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

metadata_collection_view

A read-only view of a collection of metadata objects.

Synopsis

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

using metadata_collection_view = boost::span< const metadata >;
Member Functions

Name

Description

column_collation

Returns the ID of the collation that fields belonging to this column use.

column_length

Returns the maximum length of the column.

column_name

Returns the actual name of the column.

database

Returns the name of the database (schema) the column belongs to.

decimals

Returns the number of decimals of the column.

has_no_default_value

Returns true if the column does not have a default value.

is_auto_increment

Returns true if the column is defined as AUTO_INCREMENT.

is_multiple_key

Returns true if the column is part of a KEY (but not a UNIQUE KEY or PRIMARY KEY).

is_not_null

Returns true if the column is not allowed to be NULL, false if it is nullable.

is_primary_key

Returns true if the column is part of a PRIMARY KEY.

is_set_to_now_on_update

Returns true if the column is defined as ON UPDATE CURRENT_TIMESTAMP.

is_unique_key

Returns true if the column is part of a UNIQUE KEY (but not a PRIMARY KEY).

is_unsigned

Returns true if the column has no sign (is UNSIGNED).

is_zerofill

Returns true if the column is defined as ZEROFILL (padded to its maximum length by zeros).

metadata

Default constructor.

Move constructor.

Copy constructor.

operator=

Move assignment.

Copy assignment.

original_column_name

Returns the original (physical) name of the column.

original_table

Returns the name of the physical table the column belongs to.

table

Returns the name of the virtual table the column belongs to.

type

Returns the type of the column (see column_type for more info).

~metadata [destructor]

Destructor.

This is a regular, value type. Instances of this class are not created by the user directly, but by the library.

Object lifetimes

The object doesn't own the storage for the metadata objects. These are typically owned by a results or execution_state object. This view is valid as long as the memory allocated for the metadata objects remain valid.


PrevUpHomeNext