MySQL 8.0.39
Source Code Documentation
|
Iterator class to allow iterating over the replicatable fields in a TABLE object field set. More...
#include <table_column_iterator.h>
Public Types | |
using | difference_type = std::ptrdiff_t |
using | value_type = Field * |
using | pointer = Field * |
using | reference = Field * |
using | iterator_category = std::bidirectional_iterator_tag |
Public Member Functions | |
iterator (Table_columns_view &parent, long pos, long col) | |
Constructor for the iterator. More... | |
iterator (Table_columns_view &parent, long pos, long col, long translation_offset) | |
Constructor for the iterator. More... | |
iterator (const iterator &rhs) | |
Copy constructor. More... | |
virtual | ~iterator ()=default |
Default destructor. More... | |
iterator & | operator= (const iterator &rhs) |
iterator & | operator++ () |
reference | operator* () const |
iterator | operator++ (int) |
pointer | operator-> () const |
bool | operator== (iterator rhs) const |
bool | operator!= (iterator rhs) const |
iterator & | operator-- () |
iterator | operator-- (int) |
size_t | absolute_pos () |
Returns the position this iterator object is pointing to, within the local table field set. More... | |
size_t | filtered_pos () |
Returns the position this iterator relative to the set of table columns which are not excluded by the associated filters. More... | |
size_t | translated_pos () |
Returns the position this iterator object is pointing to, within the replicated table field set plus the translation_offset. More... | |
Private Attributes | |
Table_columns_view const * | m_parent |
A reference to the instance we wish to iterate over. More... | |
long | m_absolute_pos |
The position, relative to the TABLE object, this instance iterator is pointing to. More... | |
long | m_filtered_pos |
The position, relative to the set of included fields, this instance iterator is pointing to. More... | |
long | m_translation_offset |
Translation unit used on top of the iterator filtered position, so we can adjust the position to another frame of reference. More... | |
Friends | |
struct | TABLE |
class | Table_columns_view |
Iterator class to allow iterating over the replicatable fields in a TABLE object field set.
It implements the bidirectional iterator concept.
In order to fully understand this class implementation, please, check the documentation on the Iterator concept requirements within the C++ standard and the STL definition.
using Table_columns_view< ExclusionFilter >::iterator::difference_type = std::ptrdiff_t |
using Table_columns_view< ExclusionFilter >::iterator::iterator_category = std::bidirectional_iterator_tag |
using Table_columns_view< ExclusionFilter >::iterator::pointer = Field * |
using Table_columns_view< ExclusionFilter >::iterator::reference = Field * |
using Table_columns_view< ExclusionFilter >::iterator::value_type = Field * |
|
explicit |
Constructor for the iterator.
It takes the parent Table_columns_view object and the initial positions for the replicated table and for the local table.
parent | reference to the target Table_columns_view object. |
pos | initial replicated table field set position. |
col | initial local table field set position. |
|
explicit |
Constructor for the iterator.
It takes the parent Table_columns_view object and the initial positions for the replicated table and for the local table. It also includes a translation factor so we can get the iterated position in relation to a different set of columns.
parent | reference to the target Table_columns_view object. |
pos | initial replicated table field set position. |
col | initial local table field set position. |
translation_offset | the translation offset for translated_pos() |
Table_columns_view< F >::iterator::iterator | ( | const iterator & | rhs | ) |
Copy constructor.
rhs | object instance we pretend to copy from. |
|
virtualdefault |
Default destructor.
size_t Table_columns_view< F >::iterator::absolute_pos |
Returns the position this iterator object is pointing to, within the local table field set.
size_t Table_columns_view< F >::iterator::filtered_pos |
Returns the position this iterator relative to the set of table columns which are not excluded by the associated filters.
bool Table_columns_view< F >::iterator::operator!= | ( | iterator | rhs | ) | const |
Table_columns_view< F >::iterator::reference Table_columns_view< F >::iterator::operator* |
Table_columns_view< F >::iterator & Table_columns_view< F >::iterator::operator++ |
Table_columns_view< F >::iterator Table_columns_view< F >::iterator::operator++ | ( | int | ) |
Table_columns_view< F >::iterator & Table_columns_view< F >::iterator::operator-- |
Table_columns_view< F >::iterator Table_columns_view< F >::iterator::operator-- | ( | int | ) |
Table_columns_view< F >::iterator::pointer Table_columns_view< F >::iterator::operator-> |
Table_columns_view< F >::iterator & Table_columns_view< F >::iterator::operator= | ( | const iterator & | rhs | ) |
bool Table_columns_view< F >::iterator::operator== | ( | iterator | rhs | ) | const |
size_t Table_columns_view< F >::iterator::translated_pos |
Returns the position this iterator object is pointing to, within the replicated table field set plus the translation_offset.
|
friend |
|
friend |
|
private |
The position, relative to the TABLE object, this instance iterator is pointing to.
|
private |
The position, relative to the set of included fields, this instance iterator is pointing to.
|
private |
A reference to the instance we wish to iterate over.
|
private |
Translation unit used on top of the iterator filtered position, so we can adjust the position to another frame of reference.
When this iterator is used in the context of a replica that is applying an event, use translated_pos to get the position within the event. This number should be set to N when the event has N extra columns to the left, which do not exist in the replica table.