77 using reference = row;
78 using const_iterator = const_result_iterator;
79 using pointer = const_iterator;
80 using iterator = const_iterator;
81 using const_reverse_iterator = const_reverse_result_iterator;
82 using reverse_iterator = const_reverse_iterator;
85 m_data{}, m_query{}, m_encoding{internal::encoding_group::MONOBYTE}
109 [[nodiscard]]
bool operator==(
result const &)
const noexcept;
113 return not operator==(rhs);
124 template<
typename... TYPE>
auto iter()
const;
126 [[nodiscard]] const_reverse_iterator rbegin()
const;
127 [[nodiscard]] const_reverse_iterator crbegin()
const;
128 [[nodiscard]] const_reverse_iterator rend()
const;
129 [[nodiscard]] const_reverse_iterator crend()
const;
131 [[nodiscard]] const_iterator begin() const noexcept;
132 [[nodiscard]] const_iterator cbegin() const noexcept;
133 [[nodiscard]] inline const_iterator end() const noexcept;
134 [[nodiscard]] inline const_iterator cend() const noexcept;
136 [[nodiscard]] reference front() const noexcept;
137 [[nodiscard]] reference back() const noexcept;
139 [[nodiscard]] PQXX_PURE size_type size() const noexcept;
140 [[nodiscard]] PQXX_PURE
bool empty() const noexcept;
141 [[nodiscard]] size_type capacity() const noexcept {
return size(); }
148 void swap(result &)
noexcept;
155 [[nodiscard]] row operator[](size_type i)
const noexcept;
157#if defined(PQXX_HAVE_MULTIDIM)
159 operator[](size_type row_num, row_size_type col_num)
const noexcept;
163 row at(size_type)
const;
166 field at(size_type, row_size_type)
const;
187 [[nodiscard]] PQXX_PURE
row_size_type columns() const noexcept;
193 [[nodiscard]]
char const *column_name(
row_size_type number) const &;
199 [[nodiscard]]
int column_storage(
row_size_type number) const;
212 [[nodiscard]]
int column_type_modifier(
row_size_type number) const noexcept;
218 [[nodiscard]]
oid column_type(
zview col_name)
const
220 return column_type(column_number(col_name));
229 return column_table(column_number(col_name));
238 return table_column(column_number(col_name));
243 [[nodiscard]] PQXX_PURE std::string
const &query() const & noexcept;
249 [[nodiscard]] PQXX_PURE
oid inserted_oid() const;
255 [[nodiscard]] PQXX_PURE size_type affected_rows() const;
296 template<typename CALLABLE> inline
void for_each(CALLABLE &&func) const;
299 using data_pointer = std::shared_ptr<internal::pq::PGresult const>;
304 friend class
pqxx::internal::gate::result_pipeline;
305 PQXX_PURE std::shared_ptr<std::
string const> query_ptr() const noexcept
311 std::shared_ptr<std::string const> m_query;
313 internal::encoding_group m_encoding;
315 static std::string
const s_empty_string;
317 friend class pqxx::field;
318 PQXX_PURE
char const *
319 get_value(size_type row, row_size_type col)
const noexcept;
320 PQXX_PURE
bool get_is_null(size_type row, row_size_type col)
const noexcept;
322 field_size_type get_length(size_type, row_size_type)
const noexcept;
326 std::shared_ptr<internal::pq::PGresult>
const &rhs,
327 std::shared_ptr<std::string>
const &query, internal::encoding_group enc);
329 PQXX_PRIVATE
void check_status(std::string_view desc =
""sv)
const;
332 friend class pqxx::internal::gate::result_row;
333 bool operator!() const noexcept {
return m_data.get() ==
nullptr; }
334 operator bool() const noexcept {
return m_data.get() !=
nullptr; }
336 [[noreturn]] PQXX_PRIVATE PQXX_COLD
void
337 throw_sql_error(std::string
const &Err, std::string
const &Query)
const;
338 PQXX_PRIVATE PQXX_PURE
int errorposition()
const;
339 PQXX_PRIVATE std::string status_error()
const;
342 PQXX_PURE
char const *cmd_status() const noexcept;