Autonomy Software C++ 24.5.1
Welcome to the Autonomy Software repository of the Mars Rover Design Team (MRDT) at Missouri University of Science and Technology (Missouri S&T)! API reference contains the source code and other resources for the development of the autonomy software for our Mars rover. The Autonomy Software project aims to compete in the University Rover Challenge (URC) by demonstrating advanced autonomous capabilities and robust navigation algorithms.
Loading...
Searching...
No Matches
duckdb::QueryResult::QueryResultIterator Class Reference

The row-based query result iterator. Invoking the. More...

Collaboration diagram for duckdb::QueryResult::QueryResultIterator:

Public Member Functions

 QueryResultIterator (optional_ptr< QueryResult > result_p=nullptr)
 
void Next ()
 
QueryResultIteratoroperator++ ()
 
bool operator!= (const QueryResultIterator &other) const
 
bool operator== (const QueryResultIterator &other) const
 
const QueryResultRowoperator* () const
 

Public Attributes

QueryResultRow current_row
 
optional_ptr< QueryResultresult
 
idx_t base_row
 

Detailed Description

The row-based query result iterator. Invoking the.

Constructor & Destructor Documentation

◆ QueryResultIterator()

duckdb::QueryResult::QueryResultIterator::QueryResultIterator ( optional_ptr< QueryResult result_p = nullptr)
inlineexplicit
19648 : result(result_p), base_row(0) {
19649 if (result) {
19650 current_row.chunk = shared_ptr<DataChunk>(result->Fetch().release());
19651 if (!current_row.chunk) {
19652 result = nullptr;
19653 }
19654 }
19655 }

Member Function Documentation

◆ Next()

void duckdb::QueryResult::QueryResultIterator::Next ( )
inline
19662 {
19663 if (!current_row.chunk) {
19664 return;
19665 }
19666 current_row.row++;
19667 if (current_row.row >= current_row.chunk->size()) {
19668 base_row += current_row.chunk->size();
19669 current_row.chunk = shared_ptr<DataChunk>(result->Fetch().release());
19670 current_row.row = 0;
19671 if (!current_row.chunk || current_row.chunk->size() == 0) {
19672 // exhausted all rows
19673 base_row = 0;
19674 result = nullptr;
19675 current_row.chunk.reset();
19676 }
19677 }
19678 }

◆ operator++()

QueryResultIterator & duckdb::QueryResult::QueryResultIterator::operator++ ( )
inline
19680 {
19681 Next();
19682 return *this;
19683 }

◆ operator!=()

bool duckdb::QueryResult::QueryResultIterator::operator!= ( const QueryResultIterator other) const
inline
19684 {
19685 return result != other.result || base_row != other.base_row || current_row.row != other.current_row.row;
19686 }

◆ operator==()

bool duckdb::QueryResult::QueryResultIterator::operator== ( const QueryResultIterator other) const
inline
19687 {
19688 return !(*this != other);
19689 }

◆ operator*()

const QueryResultRow & duckdb::QueryResult::QueryResultIterator::operator* ( ) const
inline
19690 {
19691 return current_row;
19692 }

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