26#ifndef TEMPTABLE_CURSOR_H
27#define TEMPTABLE_CURSOR_H
48 const Hash_duplicates_container::const_iterator &iterator);
53 const Tree_container::const_iterator &iterator);
79 unsigned char *mysql_row,
81 size_t mysql_row_length) const;
109 const
Cursor &other) const;
115 const
Cursor &other) const;
144 : m_type(
Type::
HASH), m_is_positioned(true), m_hash_iterator(iterator) {}
147 : m_type(
Type::
TREE), m_is_positioned(true), m_tree_iterator(iterator) {}
176 unsigned char *mysql_row,
177 size_t mysql_row_length)
const {
257 return !(*
this == other);
A cursor for iterating over an Index.
Definition: cursor.h:40
Cursor()
Constructor.
Definition: cursor.h:141
Cursor & operator--()
Recede the cursor backwards.
Definition: cursor.h:231
bool m_is_positioned
Indicate whether the cursor is positioned.
Definition: cursor.h:130
bool operator==(const Cursor &other) const
Check if equal to another cursor.
Definition: cursor.h:245
void unposition()
Unposition the cursor.
Definition: cursor.h:151
Tree_container::const_iterator m_tree_iterator
Iterator that is used if m_type == Type::TREE.
Definition: cursor.h:136
Type
Type of the index the cursor iterates over.
Definition: cursor.h:119
const Hash_duplicates_container::const_iterator & hash_iterator() const
Get the underlying hash iterator.
Definition: cursor.h:190
Cursor & operator++()
Advance the cursor forward.
Definition: cursor.h:218
void export_row_to_mysql(const Columns &columns, unsigned char *mysql_row, size_t mysql_row_length) const
Export the row that is pointed to by this cursor in mysql write_row() format.
Definition: cursor.h:175
Type m_type
Type of the index the cursor iterates over.
Definition: cursor.h:127
Storage::Element * row() const
Get a pointer to the row of the current cursor position.
Definition: cursor.h:164
const Indexed_cells & indexed_cells() const
Get the indexed cells of the current cursor position.
Definition: cursor.h:153
Cursor & operator=(const Cursor &rhs)
Copy-assign from another cursor.
Definition: cursor.h:201
Cursor(const Cursor &)=default
bool is_positioned() const
Check if the cursor is positioned.
Definition: cursor.h:149
bool operator!=(const Cursor &other) const
Check if not equal to another cursor.
Definition: cursor.h:256
Hash_duplicates_container::const_iterator m_hash_iterator
Iterator that is used if m_type == Type::HASH.
Definition: cursor.h:133
const Tree_container::const_iterator & tree_iterator() const
Get the underlying tree iterator.
Definition: cursor.h:196
Cursor(Cursor &&) noexcept=default
Indexed cells represent one or more cells that are covered by an index.
Definition: indexed_cells.h:45
Storage container.
Definition: storage.h:42
void Element
Type used for elements.
Definition: storage.h:45
TempTable index containers declarations.
TempTable Indexed Cells declaration.
void my_abort()
Calls our own implementation of abort, if specified, or std's abort().
Definition: my_init.cc:257
Definition: allocator.h:44
std::multiset< Indexed_cells, Indexed_cells_less, Allocator< Indexed_cells > > Tree_container
The container used by tree unique and non-unique indexes.
Definition: containers.h:41
std::unordered_multiset< Indexed_cells, Indexed_cells_hash, Indexed_cells_equal_to, Allocator< Indexed_cells > > Hash_duplicates_container
The container used by hash non-unique indexes.
Definition: containers.h:47
std::vector< Column, Allocator< Column > > Columns
A type that designates all the columns of a table.
Definition: column.h:226
TempTable Column declaration.
TempTable Row declarations.