MySQL 8.3.0
Source Code Documentation
Opt_trace_iterator Class Reference

Iterator over the list of remembered traces. More...

#include <opt_trace.h>

Public Member Functions

 Opt_trace_iterator (Opt_trace_context *ctx)
 
void next ()
 Advances iterator to next trace. More...
 
void get_value (Opt_trace_info *info) const
 Provides information about the trace on which the iterator is positioned. More...
 
bool at_end () const
 

Private Attributes

Opt_trace_contextctx
 Pointer to context, from which traces are retrieved. More...
 
const Opt_trace_stmtcursor
 trace which the iterator is positioned on More...
 
long row_count
 how many traces retrieved so far More...
 

Detailed Description

Iterator over the list of remembered traces.

Note
due to implementation, the list must not change during an iterator's lifetime, or results may be unexpected (no crash though).

Constructor & Destructor Documentation

◆ Opt_trace_iterator()

Opt_trace_iterator::Opt_trace_iterator ( Opt_trace_context ctx)
Parameters
ctxcontext

Member Function Documentation

◆ at_end()

bool Opt_trace_iterator::at_end ( ) const
inline
Returns
whether iterator is positioned to the end.

◆ get_value()

void Opt_trace_iterator::get_value ( Opt_trace_info info) const

Provides information about the trace on which the iterator is positioned.

Parameters
[out]infoinformation returned. The usage pattern is 1) instantiate the iterator 2) test at_end(), if false: call get_value() and then next() 3) repeat (2) until at_end() is true.

◆ next()

void Opt_trace_iterator::next ( )

Advances iterator to next trace.

Member Data Documentation

◆ ctx

Opt_trace_context* Opt_trace_iterator::ctx
private

Pointer to context, from which traces are retrieved.

◆ cursor

const Opt_trace_stmt* Opt_trace_iterator::cursor
private

trace which the iterator is positioned on

◆ row_count

long Opt_trace_iterator::row_count
private

how many traces retrieved so far


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