MySQL 8.0.39
Source Code Documentation
Derived_refs_iterator Class Reference

This iterates on those references to a derived table / view / CTE which are materialized. More...

#include <table.h>

Public Member Functions

 Derived_refs_iterator (Table_ref *start_arg)
 
TABLEget_next ()
 
void rewind ()
 
bool is_first () const
 

Private Attributes

Table_ref *const start
 The reference provided in construction. More...
 
size_t ref_idx {0}
 Current index in cte->tmp_tables. More...
 
bool m_is_first {true}
 True when at first reference in list. More...
 

Detailed Description

This iterates on those references to a derived table / view / CTE which are materialized.

If a recursive CTE, this includes recursive references. Upon construction it is passed a non-recursive materialized reference to the derived table (Table_ref*). For a CTE it may return more than one reference; for a derived table or a view, there is only one (as references to a same view are treated as independent objects). References are returned as TABLE*.

Constructor & Destructor Documentation

◆ Derived_refs_iterator()

Derived_refs_iterator::Derived_refs_iterator ( Table_ref start_arg)
inlineexplicit

Member Function Documentation

◆ get_next()

TABLE * Derived_refs_iterator::get_next ( )
inline

◆ is_first()

bool Derived_refs_iterator::is_first ( ) const
inline
Returns
true if the last get_next() returned the first element.

◆ rewind()

void Derived_refs_iterator::rewind ( void  )
inline

Member Data Documentation

◆ m_is_first

bool Derived_refs_iterator::m_is_first {true}
private

True when at first reference in list.

◆ ref_idx

size_t Derived_refs_iterator::ref_idx {0}
private

Current index in cte->tmp_tables.

◆ start

Table_ref* const Derived_refs_iterator::start
private

The reference provided in construction.


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