...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
Non-owning variant-like class that can represent of any of the allowed database types.
Defined in header <boost/mysql/field_view.hpp>
class field_view;
Name |
Description |
---|---|
Retrieves the underlying value as a blob or throws an exception. |
|
Retrieves the underlying value as a |
|
Retrieves the underlying value as a |
|
Retrieves the underlying value as a |
|
Retrieves the underlying value as a |
|
Retrieves the underlying value as an |
|
Retrieves the underlying value as a string or throws an exception. |
|
Retrieves the underlying value as a |
|
Retrieves the underlying value as an |
|
field_view [constructor] |
Constructs a |
Retrieves the underlying value as a blob (unchecked access). |
|
Retrieves the underlying value as a |
|
Retrieves the underlying value as a |
|
Retrieves the underlying value as a |
|
Retrieves the underlying value as a |
|
Retrieves the underlying value as an |
|
Retrieves the underlying value as a string (unchecked access). |
|
Retrieves the underlying value as a |
|
Retrieves the underlying value as an |
|
Returns whether this |
|
Returns whether this |
|
Returns whether this |
|
Returns whether this |
|
Returns whether this |
|
Returns whether this |
|
Returns whether this |
|
Returns whether this |
|
Returns whether this |
|
Returns whether this |
|
Returns the type of the value this |
|
Tests for inequality. |
|
Tests for equality. |
Name |
Description |
---|---|
Streams a |
This is a variant-like class, similar to field
, but semi-owning and read-only.
Values of this type are usually created by the library, not directly by the
user. It's cheap to construct and copy, and it's the main library interface
when reading values from MySQL.
Like a variant, at any point, a field_view
always points to a value of certain type. You can query the type using field_view::kind
and the is_xxx
functions
like field_view::is_int64
. Use as_xxx
and get_xxx
for checked and
unchecked value access, respectively. As opposed to field
, these functions return values
instead of references.
Depending on how it was constructed, field_view
can have value or reference semantics:
field_view
will have an associated row
, rows
or results
object holding memory
to which the field_view
points. It will be valid as long as the memory allocated by that object
is valid.
field
(by calling operator field_view
),
the field_view
acts as
a reference to that field
object, and will be valid as long as the field
is.
field_view
has value semnatics and will always be valid.
field_view
acts as a string_view
or blob_view
, and will
be valid as long as the original string/blob is.
Calling any member function on a field_view
that has been invalidated results in undefined behavior.
Convenience header <boost/mysql.hpp>