MySQL  8.0.23
Source Code Documentation
Copy_field Class Reference

Constitutes a mapping from columns of tables in the from clause to aggregated columns. More...

#include <field.h>

Public Member Functions

 Copy_field ()=default
 
 Copy_field (Field *to, Field *from, bool save)
 
void set (Field *to, Field *from, bool save)
 
void invoke_do_copy (bool reverse=false)
 
void invoke_do_copy2 (const Field *from_field, Field *to_field)
 
Fieldfrom_field ()
 
Fieldto_field ()
 

Public Attributes

String tmp
 

Private Types

using Copy_func = void(Copy_field *, const Field *, Field *)
 Convenience definition of a copy function returned by get_copy_func. More...
 

Private Member Functions

Copy_funcget_copy_func (bool save)
 

Private Attributes

void(* m_do_copy )(Copy_field *, const Field *, Field *)
 
void(* m_do_copy2 )(Copy_field *, const Field *, Field *)
 
Fieldm_from_field {nullptr}
 
Fieldm_to_field {nullptr}
 

Detailed Description

Constitutes a mapping from columns of tables in the from clause to aggregated columns.

Typically, this means that they represent the mapping between columns of temporary tables used for aggregation, but not always. They are also used for aggregation that can be executed "on the fly" without a temporary table.

Member Typedef Documentation

◆ Copy_func

using Copy_field::Copy_func = void(Copy_field *, const Field *, Field *)
private

Convenience definition of a copy function returned by get_copy_func.

The parameters are: Copy_field* Instance of this class. Used for accessing 'tmp' and calling invoke_do_copy2(). const Field* Field copying from. Field* Field copying to. Note that 'from' is 'm_to_field' if invoke_do_copy() is called with 'reverse' = true.

Constructor & Destructor Documentation

◆ Copy_field() [1/2]

Copy_field::Copy_field ( )
default

◆ Copy_field() [2/2]

Copy_field::Copy_field ( Field to,
Field from,
bool  save 
)
inline

Member Function Documentation

◆ from_field()

Field* Copy_field::from_field ( )
inline

◆ get_copy_func()

Copy_field::Copy_func * Copy_field::get_copy_func ( bool  save)
private

◆ invoke_do_copy()

void Copy_field::invoke_do_copy ( bool  reverse = false)

◆ invoke_do_copy2()

void Copy_field::invoke_do_copy2 ( const Field from_field,
Field to_field 
)

◆ set()

void Copy_field::set ( Field to,
Field from,
bool  save 
)

◆ to_field()

Field* Copy_field::to_field ( )
inline

Member Data Documentation

◆ m_do_copy

void(* Copy_field::m_do_copy) (Copy_field *, const Field *, Field *)
private

◆ m_do_copy2

void(* Copy_field::m_do_copy2) (Copy_field *, const Field *, Field *)
private

◆ m_from_field

Field* Copy_field::m_from_field {nullptr}
private

◆ m_to_field

Field* Copy_field::m_to_field {nullptr}
private

◆ tmp

String Copy_field::tmp

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