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

Lazy cell that defers parsing until accessed. More...

#include <relx/results/lazy_result.hpp>

Public Member Functions

 LazyCell (std::string_view raw_data, size_t start_pos, size_t end_pos)
 Constructs a lazy cell with raw data and parsing context.
 
bool is_null () const
 Check if the cell contains a NULL value.
 
std::string get_raw_value () const
 Get the raw string value (parsed on demand)
 
template<typename T >
ResultProcessingResult< T > as () const
 Parse the cell's value as the specified type.
 
template<typename T >
ResultProcessingResult< T > as (bool allow_numeric_bools) const
 Parse the cell's value as the specified type with boolean conversion options.
 

Detailed Description

Lazy cell that defers parsing until accessed.

Definition at line 19 of file lazy_result.hpp.

Constructor & Destructor Documentation

◆ LazyCell()

relx::result::LazyCell::LazyCell ( std::string_view  raw_data,
size_t  start_pos,
size_t  end_pos 
)
inline

Constructs a lazy cell with raw data and parsing context.

Definition at line 22 of file lazy_result.hpp.

Member Function Documentation

◆ as() [1/2]

template<typename T >
ResultProcessingResult< T > relx::result::LazyCell::as ( ) const
inline

Parse the cell's value as the specified type.

Definition at line 38 of file lazy_result.hpp.

◆ as() [2/2]

template<typename T >
ResultProcessingResult< T > relx::result::LazyCell::as ( bool  allow_numeric_bools) const
inline

Parse the cell's value as the specified type with boolean conversion options.

Definition at line 44 of file lazy_result.hpp.

◆ get_raw_value()

std::string relx::result::LazyCell::get_raw_value ( ) const
inline

Get the raw string value (parsed on demand)

Definition at line 32 of file lazy_result.hpp.

◆ is_null()

bool relx::result::LazyCell::is_null ( ) const
inline

Check if the cell contains a NULL value.

Definition at line 26 of file lazy_result.hpp.


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