Index interface.
More...
#include <index.h>
◆ Lookup
Index lookup (search) result.
Enumerator |
---|
FOUND | The searched for indexed cells were found and the cursor is positioned on them.
|
NOT_FOUND_CURSOR_POSITIONED_ON_NEXT | The searched for indexed cells were not found and the cursor is positioned on the next indexed cells in index order.
|
NOT_FOUND_CURSOR_UNDEFINED | The searched for indexed cells were not found and the cursor position is undefined.
|
◆ Index()
temptable::Index::Index |
( |
const Table & |
table, |
|
|
const KEY & |
mysql_index |
|
) |
| |
Constructor.
- Parameters
-
[in] | table | Table where this index belongs, used only for fetching metadata of its columns. |
[in] | mysql_index | MySQL index, for querying metadata. |
◆ ~Index()
temptable::Index::~Index |
( |
| ) |
|
|
virtual |
◆ begin()
virtual Cursor temptable::Index::begin |
( |
| ) |
const |
|
pure virtual |
◆ end()
virtual Cursor temptable::Index::end |
( |
| ) |
const |
|
pure virtual |
◆ erase()
virtual void temptable::Index::erase |
( |
const Cursor & |
target | ) |
|
|
pure virtual |
◆ indexed_column()
const Indexed_column & temptable::Index::indexed_column |
( |
size_t |
i | ) |
const |
|
inline |
Get the Nth indexed column.
- Returns
- the Nth indexed column
- Parameters
-
[in] | i | Index of the column to fetch, must be < `number_of_indexed_columns()`. |
◆ insert()
Insert a new entry into the index.
- Returns
- Result::OK or another Result::* error code
- Parameters
-
[in] | indexed_cells | Indexed cells to insert. |
[out] | insert_position | If insert succeeds (Result::OK) this will be set to the position inside the index where the new indexed cells where inserted. |
Implemented in temptable::Tree, temptable::Hash_duplicates, and temptable::Hash_unique.
◆ lookup() [1/2]
Lookup (search) an indexed cells.
- Return values
-
Lookup::FOUND | the provided search_cells were found and first was positioned on them (the first entry, if there are duplicates). |
Lookup::NOT_FOUND_CURSOR_POSITIONED_ON_NEXT | the provided search_cells were not found and first was positioned on the next indexed cells in index order. |
Lookup::NOT_FOUND_CURSOR_UNDEFINED | the provided search_cells were not found and first is undefined. |
- Parameters
-
[in] | search_cells | Indexed cells to search for. |
[out] | first | First indexed cells that were found, see above. |
Implemented in temptable::Tree, temptable::Hash_duplicates, and temptable::Hash_unique.
◆ lookup() [2/2]
Lookup (search) an indexed cells.
- Return values
-
Lookup::FOUND | the provided search_cells were found, first was positioned on them (the first entry, if there are duplicates) and after_last was positioned after the last matching entry. |
Lookup::NOT_FOUND_CURSOR_POSITIONED_ON_NEXT | the provided search_cells were not found and first and after_last were positioned on the next indexed cells in index order. |
Lookup::NOT_FOUND_CURSOR_UNDEFINED | the provided search_cells were not found and first and after_last are undefined. |
Implemented in temptable::Tree, temptable::Hash_duplicates, and temptable::Hash_unique.
◆ mysql_index()
const KEY & temptable::Index::mysql_index |
( |
| ) |
const |
|
inline |
Get the MySQL index structure which corresponds to this index.
- Returns
- mysql index
◆ number_of_indexed_columns()
size_t temptable::Index::number_of_indexed_columns |
( |
| ) |
const |
|
inline |
Get the number of indexed columns by this index.
- Returns
- number of indexed columns
◆ table()
const Table & temptable::Index::table |
( |
| ) |
const |
|
inline |
Get the table of the index.
- Returns
- table
◆ truncate()
virtual void temptable::Index::truncate |
( |
| ) |
|
|
pure virtual |
◆ m_indexed_columns
Indexed columns metadata, from [0, m_number_of_indexed_columns).
◆ m_mysql_index
const KEY* temptable::Index::m_mysql_index |
|
private |
◆ m_number_of_indexed_columns
size_t temptable::Index::m_number_of_indexed_columns |
|
private |
Number of indexed columns.
◆ m_table
const Table& temptable::Index::m_table |
|
private |
The documentation for this class was generated from the following files: