MySQL  8.0.19
Source Code Documentation
histograms::Histogram_comparator Struct Reference

Histogram comparator. More...

#include <value_map.h>

Public Member Functions

template<class T >
bool operator() (const T &lhs, const T &rhs) const
 Overload operator(), so that we can use this struct as a custom comparator in std classes/functions. More...
 
template<class T >
bool operator() (const equi_height::Bucket< T > &a, const T &b) const
 
template<class T >
bool operator() (const equi_height::Bucket< T > &a, const equi_height::Bucket< T > &b) const
 
template<>
bool operator() (const String &lhs, const String &rhs) const
 
template<>
bool operator() (const MYSQL_TIME &lhs, const MYSQL_TIME &rhs) const
 
template<>
bool operator() (const my_decimal &lhs, const my_decimal &rhs) const
 

Detailed Description

Histogram comparator.

Typical usage is in a "value map", where we for instance need to sort based on string collation and similar.

Member Function Documentation

◆ operator()() [1/6]

template<class T >
bool histograms::Histogram_comparator::operator() ( const equi_height::Bucket< T > &  a,
const equi_height::Bucket< T > &  b 
) const
inline

◆ operator()() [2/6]

template<class T >
bool histograms::Histogram_comparator::operator() ( const equi_height::Bucket< T > &  a,
const T &  b 
) const
inline

◆ operator()() [3/6]

template<>
bool histograms::Histogram_comparator::operator() ( const my_decimal lhs,
const my_decimal rhs 
) const

◆ operator()() [4/6]

template<>
bool histograms::Histogram_comparator::operator() ( const MYSQL_TIME lhs,
const MYSQL_TIME rhs 
) const

◆ operator()() [5/6]

template<>
bool histograms::Histogram_comparator::operator() ( const String lhs,
const String rhs 
) const

◆ operator()() [6/6]

template<class T >
bool histograms::Histogram_comparator::operator() ( const T &  lhs,
const T &  rhs 
) const
inline

Overload operator(), so that we can use this struct as a custom comparator in std classes/functions.

Parameters
lhsfirst value to compare
rhssecond value to compare
Returns
true if lhs is considered to be smaller/less than rhs. false otherwise.

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