Accessor to a single field in a result set's row.
More...
#include <userver/storages/postgres/result_set.hpp>
|
class | Row |
|
bool | IsNull () const |
|
template<typename T > |
size_type | To (T &&val) const |
|
template<typename T > |
void | Coalesce (T &val, const T &default_val) const |
|
template<typename T > |
std::decay< T >::type | As () const |
|
template<typename T > |
std::decay< T >::type | Coalesce (const T &default_val) const |
|
const io::TypeBufferCategory & | GetTypeBufferCategories () const |
|
| Field (detail::ResultWrapperPtr res, size_type row, size_type col) |
|
template<typename T > |
size_type | ReadNullable (const io::FieldBuffer &fb, T &&val, std::true_type) const |
|
template<typename T > |
size_type | ReadNullable (const io::FieldBuffer &buffer, T &&val, std::false_type) const |
|
|
bool | IsValid () const |
|
int | Compare (const Field &rhs) const |
|
std::ptrdiff_t | Distance (const Field &rhs) const |
|
Field & | Advance (std::ptrdiff_t) |
|
Accessor to a single field in a result set's row.
Definition at line 228 of file result_set.hpp.
◆ size_type
using storages::postgres::Field::size_type = std::size_t |
◆ Field()
storages::postgres::Field::Field |
( |
detail::ResultWrapperPtr |
res, |
|
|
size_type |
row, |
|
|
size_type |
col |
|
) |
| |
|
inlineprotected |
◆ As()
template<typename T >
std::decay< T >::type storages::postgres::Field::As |
( |
| ) |
const |
|
inline |
Convert the field's buffer into a C++ type.
- Exceptions
-
Definition at line 273 of file result_set.hpp.
◆ Coalesce() [1/2]
template<typename T >
std::decay< T >::type storages::postgres::Field::Coalesce |
( |
const T & |
default_val | ) |
const |
|
inline |
Convert the field's buffer into a C++ type. If the field is null, return default value.
Definition at line 282 of file result_set.hpp.
◆ Coalesce() [2/2]
template<typename T >
void storages::postgres::Field::Coalesce |
( |
T & |
val, |
|
|
const T & |
default_val |
|
) |
| const |
|
inline |
Read the field's buffer into user-provided variable. If the field is null, set the variable to the default value.
Definition at line 262 of file result_set.hpp.
◆ FieldIndex()
size_type storages::postgres::Field::FieldIndex |
( |
| ) |
const |
|
inline |
◆ ReadNullable() [1/2]
template<typename T >
size_type storages::postgres::Field::ReadNullable |
( |
const io::FieldBuffer & |
buffer, |
|
|
T && |
val, |
|
|
std::false_type |
|
|
) |
| const |
|
inlineprotected |
◆ ReadNullable() [2/2]
template<typename T >
size_type storages::postgres::Field::ReadNullable |
( |
const io::FieldBuffer & |
fb, |
|
|
T && |
val, |
|
|
std::true_type |
|
|
) |
| const |
|
inlineprotected |
◆ RowIndex()
size_type storages::postgres::Field::RowIndex |
( |
| ) |
const |
|
inline |
◆ To()
template<typename T >
size_type storages::postgres::Field::To |
( |
T && |
val | ) |
const |
|
inline |
Read the field's buffer into user-provided variable.
- Exceptions
-
Definition at line 252 of file result_set.hpp.
◆ Row
The documentation for this class was generated from the following file: