MySQL 8.3.0
Source Code Documentation
ddl::Compare_key Struct Reference

Compare the keys of an index. More...

#include <ddl0impl-compare.h>

Public Member Functions

 Compare_key (const dict_index_t *index, Dup *dups, bool compare_all) noexcept
 Constructor. More...
 
 Compare_key (const Compare_key &)=default
 
 ~Compare_key ()=default
 Destructor. More...
 
int operator() (const dfield_t *lhs, const dfield_t *rhs) const noexcept
 Compare two tuples. More...
 

Public Attributes

Dupm_dups {}
 For collecting duplicates. More...
 
const size_t m_n_unique {}
 Number of unique fields in the index key. More...
 
const size_t m_n_fields {}
 Total number of fields in the index key. More...
 
const dict_field_tm_fields {}
 Index key fields. More...
 

Detailed Description

Compare the keys of an index.

Constructor & Destructor Documentation

◆ Compare_key() [1/2]

ddl::Compare_key::Compare_key ( const dict_index_t index,
Dup dups,
bool  compare_all 
)
inlinenoexcept

Constructor.

Parameters
[in]indexCompare the keys of this index.
[in,out]dupsFor capturing the duplicate entries.
[in]compare_allIf set, compare all columns in the key.

◆ Compare_key() [2/2]

ddl::Compare_key::Compare_key ( const Compare_key )
default

◆ ~Compare_key()

ddl::Compare_key::~Compare_key ( )
default

Destructor.

Member Function Documentation

◆ operator()()

int ddl::Compare_key::operator() ( const dfield_t lhs,
const dfield_t rhs 
) const
inlinenoexcept

Compare two tuples.

Parameters
[in]lhsTuple to compare on the left hand side
[in]rhsTuple to compare on the Right hand side
Return values
+ve- if lhs > rhs
-ve- if lhs < rhs
0- if lhs == rhs

Member Data Documentation

◆ m_dups

Dup* ddl::Compare_key::m_dups {}

For collecting duplicates.

◆ m_fields

const dict_field_t* ddl::Compare_key::m_fields {}

Index key fields.

◆ m_n_fields

const size_t ddl::Compare_key::m_n_fields {}

Total number of fields in the index key.

◆ m_n_unique

const size_t ddl::Compare_key::m_n_unique {}

Number of unique fields in the index key.


The documentation for this struct was generated from the following file: