relx 0.1.0
A Modern C++23 Type-Safe SQL Query Builder
Loading...
Searching...
No Matches
relx::result::LazyResultSet Class Reference

Lazy result set that defers row parsing until accessed. More...

#include <relx/results/lazy_result.hpp>

Classes

class  iterator
 Iterator for lazy rows. More...
 

Public Member Functions

 LazyResultSet (std::string raw_data)
 Constructs a lazy result set with raw data.
 
size_t size () const
 Get the number of rows (requires parsing row boundaries)
 
bool empty () const
 Check if the result set is empty.
 
ResultProcessingResult< LazyRowat (size_t index) const
 Get a row by index (parsed on demand)
 
LazyRow operator[] (size_t index) const
 Access a row by index using the subscript operator.
 
const std::vector< std::string > & column_names () const
 Get the column names.
 
iterator begin () const
 
iterator end () const
 
ResultProcessingResult< ResultSetto_result_set () const
 Transform to regular ResultSet if needed.
 

Detailed Description

Lazy result set that defers row parsing until accessed.

Definition at line 237 of file lazy_result.hpp.

Constructor & Destructor Documentation

◆ LazyResultSet()

relx::result::LazyResultSet::LazyResultSet ( std::string  raw_data)
inline

Constructs a lazy result set with raw data.

Definition at line 240 of file lazy_result.hpp.

Member Function Documentation

◆ at()

ResultProcessingResult< LazyRow > relx::result::LazyResultSet::at ( size_t  index) const
inline

Get a row by index (parsed on demand)

Definition at line 252 of file lazy_result.hpp.

◆ begin()

iterator relx::result::LazyResultSet::begin ( ) const
inline

Definition at line 308 of file lazy_result.hpp.

◆ column_names()

const std::vector< std::string > & relx::result::LazyResultSet::column_names ( ) const
inline

Get the column names.

Definition at line 276 of file lazy_result.hpp.

◆ empty()

bool relx::result::LazyResultSet::empty ( ) const
inline

Check if the result set is empty.

Definition at line 249 of file lazy_result.hpp.

◆ end()

iterator relx::result::LazyResultSet::end ( ) const
inline

Definition at line 310 of file lazy_result.hpp.

◆ operator[]()

LazyRow relx::result::LazyResultSet::operator[] ( size_t  index) const
inline

Access a row by index using the subscript operator.

Note
This method assumes index is valid - use at() for error checking

Definition at line 266 of file lazy_result.hpp.

◆ size()

size_t relx::result::LazyResultSet::size ( ) const
inline

Get the number of rows (requires parsing row boundaries)

Definition at line 243 of file lazy_result.hpp.

◆ to_result_set()

ResultProcessingResult< ResultSet > relx::result::LazyResultSet::to_result_set ( ) const
inline

Transform to regular ResultSet if needed.

Note
This method will propagate any errors encountered during transformation

Definition at line 314 of file lazy_result.hpp.


The documentation for this class was generated from the following file: