Orbit Framework
An ultra-modern, asynchronous, cross-platform C++ Web Framework.
Loading...
Searching...
No Matches
database::ResultSet Class Reference

Represents a generic, unified result set from a database query. More...

#include <ResultSet.hpp>

Public Member Functions

 ResultSet ()=default
 
 ResultSet (std::vector< Row > rows, uint64_t affected_rows=0)
 
const std::vector< Row > & rows () const
 
size_t size () const
 
bool empty () const
 
uint64_t affected_rows () const
 
const Rowoperator[] (size_t index) const
 
nlohmann::json to_json () const
 Serializes the entire result set to a JSON array of objects.
 

Detailed Description

Represents a generic, unified result set from a database query.

Constructor & Destructor Documentation

◆ ResultSet() [1/2]

database::ResultSet::ResultSet ( )
default

◆ ResultSet() [2/2]

database::ResultSet::ResultSet ( std::vector< Row rows,
uint64_t  affected_rows = 0 
)
inline

Member Function Documentation

◆ affected_rows()

uint64_t database::ResultSet::affected_rows ( ) const
inline

◆ empty()

bool database::ResultSet::empty ( ) const
inline

◆ operator[]()

const Row & database::ResultSet::operator[] ( size_t  index) const
inline

◆ rows()

const std::vector< Row > & database::ResultSet::rows ( ) const
inline

◆ size()

size_t database::ResultSet::size ( ) const
inline

◆ to_json()

nlohmann::json database::ResultSet::to_json ( ) const
inline

Serializes the entire result set to a JSON array of objects.


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