MySQL  8.0.19
Source Code Documentation
ORDER_with_src Class Reference

Wrapper for ORDER* pointer to trace origins of ORDER list. More...

#include <sql_optimizer.h>

Classes

struct  null
 Private empty class to implement type-safe NULL assignment. More...
 

Public Member Functions

 ORDER_with_src ()
 
 ORDER_with_src (ORDER *order_arg, Explain_sort_clause src_arg)
 
ORDER_with_srcoperator= (null *)
 Type-safe NULL assignment. More...
 
 ORDER_with_src (null *)
 Type-safe constructor from NULL. More...
 
 operator ORDER * ()
 Transparent access to the wrapped order list. More...
 
 operator const ORDER * () const
 
ORDERoperator-> () const
 
void clean ()
 
int get_flags () const
 

Public Attributes

ORDERorder
 ORDER expression that we are wrapping with this class. More...
 
Explain_sort_clause src
 origin of order list More...
 

Private Attributes

int flags
 bitmap of Explain_sort_property More...
 

Detailed Description

Wrapper for ORDER* pointer to trace origins of ORDER list.

As far as ORDER is just a head object of ORDER expression chain, we need some wrapper object to associate flags with the whole ORDER list.

Constructor & Destructor Documentation

◆ ORDER_with_src() [1/3]

ORDER_with_src::ORDER_with_src ( )
inline

◆ ORDER_with_src() [2/3]

ORDER_with_src::ORDER_with_src ( ORDER order_arg,
Explain_sort_clause  src_arg 
)
inline

◆ ORDER_with_src() [3/3]

ORDER_with_src::ORDER_with_src ( null )
inline

Type-safe constructor from NULL.

See a commentary for the "null" type above.

Member Function Documentation

◆ clean()

void ORDER_with_src::clean ( )
inline

◆ get_flags()

int ORDER_with_src::get_flags ( ) const
inline

◆ operator const ORDER *()

ORDER_with_src::operator const ORDER * ( ) const
inline

◆ operator ORDER *()

ORDER_with_src::operator ORDER * ( )
inline

Transparent access to the wrapped order list.

These operators are safe, since we don't do any conversion of ORDER_with_src value, but just an access to the wrapped ORDER pointer value. We can use ORDER_with_src objects instead ORDER pointers in a transparent way without accessor functions.

Note
This operator also implements safe "operator bool()" functionality.

◆ operator->()

ORDER* ORDER_with_src::operator-> ( ) const
inline

◆ operator=()

ORDER_with_src& ORDER_with_src::operator= ( null )
inline

Type-safe NULL assignment.

See a commentary for the "null" type above.

Member Data Documentation

◆ flags

int ORDER_with_src::flags
private

bitmap of Explain_sort_property

◆ order

ORDER* ORDER_with_src::order

ORDER expression that we are wrapping with this class.

◆ src

Explain_sort_clause ORDER_with_src::src

origin of order list


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