#include </data/code/userver/odbc/include/userver/storages/odbc/result_set.hpp>
Result set for ODBC query execution.
Definition at line 72 of file result_set.hpp.
Public Types | |
| using | size_type = std::size_t |
| using | difference_type = std::ptrdiff_t |
Static Public Attributes | |
| static constexpr size_type | npos = std::numeric_limits<size_type>::max() |
Row container concept | |
| using | value_type = Row |
| using | reference = value_type |
| ResultSet (std::shared_ptr< detail::ResultWrapper > pimpl) | |
| size_type | FieldCount () const |
| Get the number of columns in the result set. | |
| size_type | Size () const |
| size_type | RowsAffected () const |
| Number of rows affected by a data-modifying statement. Returns zero when the driver reports an unknown count. | |
| std::string_view | GetFieldName (size_type index) const |
| Get a result column name by zero-based index. | |
| bool | IsEmpty () const |
| Check if the result set is empty. | |
| reference | operator[] (size_type index) const & |
| template<typename Container> requires impl::ResultContainer<Container> | |
| Container | AsContainer () const |
| template<typename T> requires impl::kIsResultValue<T> | |
| T | AsSingleRow () const |
| Materializes the only result row, requiring exactly one row. | |
| template<typename T> requires impl::kIsResultValue<T> | |
| std::optional< T > | AsOptionalSingleRow () const |
| using storages::odbc::ResultSet::difference_type = std::ptrdiff_t |
Definition at line 75 of file result_set.hpp.
| using storages::odbc::ResultSet::reference = value_type |
Definition at line 82 of file result_set.hpp.
| using storages::odbc::ResultSet::size_type = std::size_t |
Definition at line 74 of file result_set.hpp.
| using storages::odbc::ResultSet::value_type = Row |
Definition at line 81 of file result_set.hpp.
|
inlineexplicit |
Definition at line 85 of file result_set.hpp.
| Container storages::odbc::ResultSet::AsContainer | ( | ) | const |
Materializes every row into the container's value type. Scalar values require exactly one result column; aggregate values are initialized in declaration order and require an exact column count.
Definition at line 164 of file result_set.hpp.
| std::optional< T > storages::odbc::ResultSet::AsOptionalSingleRow | ( | ) | const |
Returns no value for zero rows, materializes one row, and rejects more than one row. For optional-valued T the outer optional represents row presence and the inner optional represents SQL NULL.
Definition at line 190 of file result_set.hpp.
| T storages::odbc::ResultSet::AsSingleRow | ( | ) | const |
Materializes the only result row, requiring exactly one row.
Definition at line 181 of file result_set.hpp.
|
staticconstexpr |
Definition at line 76 of file result_set.hpp.