MySQL 9.1.0
Source Code Documentation
|
An adapter class to support iteration over an iterator of Item * (typically mem_root_deque<Item *>), while skipping over items that are hidden (item->hidden == true). More...
Go to the source code of this file.
Classes | |
class | VisibleFieldsAdapter< Iterator > |
class | VisibleFieldsContainer< Container, Iterator > |
Typedefs | |
using | VisibleFieldsIterator = VisibleFieldsContainer< mem_root_deque< Item * >, mem_root_deque< Item * >::iterator > |
using | VisibleFieldsConstIterator = VisibleFieldsContainer< const mem_root_deque< Item * >, mem_root_deque< Item * >::const_iterator > |
Functions | |
VisibleFieldsIterator | VisibleFields (mem_root_deque< Item * > &fields) |
VisibleFieldsConstIterator | VisibleFields (const mem_root_deque< Item * > &fields) |
An adapter class to support iteration over an iterator of Item * (typically mem_root_deque<Item *>), while skipping over items that are hidden (item->hidden == true).
This is such a common operation that it warrants having its own adapter. You can either do
for (Item *item : VisibleFields(fields))
or use select->visible_fields().
Behavior is undefined if you modify the hidden flag of an item during iteration.
TODO(sgunders): When we get C++20, replace with an std::views::filter.
using VisibleFieldsConstIterator = VisibleFieldsContainer<const mem_root_deque<Item *>, mem_root_deque<Item *>::const_iterator> |
using VisibleFieldsIterator = VisibleFieldsContainer<mem_root_deque<Item *>, mem_root_deque<Item *>::iterator> |
|
inline |
|
inline |