MySQL 8.0.39
Source Code Documentation
|
A cursor for iterating over an Index
.
More...
#include <cursor.h>
Public Member Functions | |
Cursor () | |
Constructor. More... | |
Cursor (const Hash_duplicates_container::const_iterator &iterator) | |
Constructor from Hash_duplicates iterator. More... | |
Cursor (const Tree_container::const_iterator &iterator) | |
Constructor from Tree iterator. More... | |
Cursor (const Cursor &)=default | |
Cursor (Cursor &&) noexcept=default | |
bool | is_positioned () const |
Check if the cursor is positioned. More... | |
void | unposition () |
Unposition the cursor. More... | |
const Indexed_cells & | indexed_cells () const |
Get the indexed cells of the current cursor position. More... | |
Storage::Element * | row () const |
Get a pointer to the row of the current cursor position. More... | |
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. More... | |
const Hash_duplicates_container::const_iterator & | hash_iterator () const |
Get the underlying hash iterator. More... | |
const Tree_container::const_iterator & | tree_iterator () const |
Get the underlying tree iterator. More... | |
Cursor & | operator= (const Cursor &rhs) |
Copy-assign from another cursor. More... | |
Cursor & | operator++ () |
Advance the cursor forward. More... | |
Cursor & | operator-- () |
Recede the cursor backwards. More... | |
bool | operator== (const Cursor &other) const |
Check if equal to another cursor. More... | |
bool | operator!= (const Cursor &other) const |
Check if not equal to another cursor. More... | |
Private Types | |
enum class | Type : uint8_t { HASH , TREE } |
Type of the index the cursor iterates over. More... | |
Private Attributes | |
Type | m_type |
Type of the index the cursor iterates over. More... | |
bool | m_is_positioned |
Indicate whether the cursor is positioned. More... | |
Hash_duplicates_container::const_iterator | m_hash_iterator |
Iterator that is used if m_type == Type::HASH . More... | |
Tree_container::const_iterator | m_tree_iterator |
Iterator that is used if m_type == Type::TREE . More... | |
A cursor for iterating over an Index
.
|
strongprivate |
|
inline |
Constructor.
|
inlineexplicit |
Constructor from Hash_duplicates
iterator.
[in] | iterator | Iterator for cursor initial position. |
|
inlineexplicit |
Constructor from Tree
iterator.
[in] | iterator | Iterator for cursor initial position. |
|
default |
|
defaultnoexcept |
|
inline |
Export the row that is pointed to by this cursor in mysql write_row() format.
[in] | columns | Metadata for the columns that constitute the row. |
[out] | mysql_row | Destination buffer to write the row to. |
[in] | mysql_row_length | Presumed length of the mysql row in bytes. |
|
inline |
Get the underlying hash iterator.
The cursor must be on a hash index.
|
inline |
Get the indexed cells of the current cursor position.
|
inline |
Check if the cursor is positioned.
|
inline |
Check if not equal to another cursor.
[in] | other | Cursor to compare with. |
|
inline |
Advance the cursor forward.
|
inline |
Recede the cursor backwards.
Copy-assign from another cursor.
[in] | rhs | Source cursor to assign from. |
|
inline |
Check if equal to another cursor.
[in] | other | Cursor to compare with. |
|
inline |
Get a pointer to the row of the current cursor position.
|
inline |
Get the underlying tree iterator.
The cursor must be on a tree index.
|
inline |
Unposition the cursor.
|
private |
Iterator that is used if m_type == Type::HASH
.
|
private |
Indicate whether the cursor is positioned.
|
private |
Iterator that is used if m_type == Type::TREE
.
|
private |
Type of the index the cursor iterates over.