MySQL 8.0.39
Source Code Documentation
temptable::Hash_duplicates Class Reference

#include <index.h>

Inheritance diagram for temptable::Hash_duplicates:
[legend]

Public Types

typedef Hash_duplicates_container Container
 
- Public Types inherited from temptable::Index
enum class  Lookup { FOUND , NOT_FOUND_CURSOR_POSITIONED_ON_NEXT , NOT_FOUND_CURSOR_UNDEFINED }
 Index lookup (search) result. More...
 

Public Member Functions

 Hash_duplicates (const Table &table, const KEY &mysql_index, const Allocator< Indexed_cells > &allocator)
 
Result insert (const Indexed_cells &indexed_cells, Cursor *insert_position) override
 Insert a new entry into the index. More...
 
Lookup lookup (const Indexed_cells &search_cells, Cursor *first) const override
 Lookup (search) an indexed cells. More...
 
Lookup lookup (const Indexed_cells &search_cells, Cursor *first, Cursor *after_last) const override
 Lookup (search) an indexed cells. More...
 
void erase (const Cursor &target) override
 Erase the indexed cells pointer to by a cursor. More...
 
void truncate () override
 Truncate the index, deleting all of its entries. More...
 
Cursor begin () const override
 Get a cursor to the first entry. More...
 
Cursor end () const override
 Get a cursor after the last entry. More...
 
- Public Member Functions inherited from temptable::Index
 Index (const Table &table, const KEY &mysql_index)
 Constructor. More...
 
virtual ~Index ()
 Destructor. More...
 
size_t number_of_indexed_columns () const
 Get the number of indexed columns by this index. More...
 
const Indexed_columnindexed_column (size_t i) const
 Get the Nth indexed column. More...
 
const Tabletable () const
 Get the table of the index. More...
 
const KEYmysql_index () const
 Get the MySQL index structure which corresponds to this index. More...
 

Public Attributes

Container m_hash_table
 

Member Typedef Documentation

◆ Container

Constructor & Destructor Documentation

◆ Hash_duplicates()

temptable::Hash_duplicates::Hash_duplicates ( const Table table,
const KEY mysql_index,
const Allocator< Indexed_cells > &  allocator 
)

Member Function Documentation

◆ begin()

Cursor temptable::Hash_duplicates::begin ( ) const
overridevirtual

Get a cursor to the first entry.

Returns
cursor to the first indexed cells in index order

Implements temptable::Index.

◆ end()

Cursor temptable::Hash_duplicates::end ( ) const
overridevirtual

Get a cursor after the last entry.

Returns
a cursor after the last indexed cells in index order

Implements temptable::Index.

◆ erase()

void temptable::Hash_duplicates::erase ( const Cursor target)
overridevirtual

Erase the indexed cells pointer to by a cursor.

Parameters
[in]targetPosition to erase.

Implements temptable::Index.

◆ insert()

Result temptable::Hash_duplicates::insert ( const Indexed_cells indexed_cells,
Cursor insert_position 
)
overridevirtual

Insert a new entry into the index.

Returns
Result::OK or another Result::* error code
Parameters
[in]indexed_cellsIndexed cells to insert.
[out]insert_positionIf insert succeeds (Result::OK) this will be set to the position inside the index where the new indexed cells where inserted.

Implements temptable::Index.

◆ lookup() [1/2]

Index::Lookup temptable::Hash_duplicates::lookup ( const Indexed_cells search_cells,
Cursor first 
) const
overridevirtual

Lookup (search) an indexed cells.

Return values
Lookup::FOUNDthe provided search_cells were found and first was positioned on them (the first entry, if there are duplicates).
Lookup::NOT_FOUND_CURSOR_POSITIONED_ON_NEXTthe provided search_cells were not found and first was positioned on the next indexed cells in index order.
Lookup::NOT_FOUND_CURSOR_UNDEFINEDthe provided search_cells were not found and first is undefined.
Parameters
[in]search_cellsIndexed cells to search for.
[out]firstFirst indexed cells that were found, see above.

Implements temptable::Index.

◆ lookup() [2/2]

Index::Lookup temptable::Hash_duplicates::lookup ( const Indexed_cells search_cells,
Cursor first,
Cursor after_last 
) const
overridevirtual

Lookup (search) an indexed cells.

Return values
Lookup::FOUNDthe 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_NEXTthe 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_UNDEFINEDthe provided search_cells were not found and first and after_last are undefined.

Implements temptable::Index.

◆ truncate()

void temptable::Hash_duplicates::truncate ( )
overridevirtual

Truncate the index, deleting all of its entries.

Implements temptable::Index.

Member Data Documentation

◆ m_hash_table

Container temptable::Hash_duplicates::m_hash_table

The documentation for this class was generated from the following files: