MySQL 8.0.39
Source Code Documentation
Multi_value_entry_builder Class Referenceabstract

Class to build a series of entries based on one multi-value field. More...

#include <row0row.h>

Inheritance diagram for Multi_value_entry_builder:
[legend]

Public Member Functions

 Multi_value_entry_builder (dict_index_t *index, dtuple_t *entry, bool selected)
 Constructor. More...
 
virtual ~Multi_value_entry_builder ()=default
 
dtuple_tbegin (uint32_t pos=0)
 Get the first index entry. More...
 
dtuple_tnext ()
 Get next index entry based on next multi-value data. More...
 
uint32_t last_multi_value_position () const
 Get the position of last generated multi-value data. More...
 

Protected Member Functions

virtual dfield_tfind_multi_value_field ()=0
 Find the multi-value field from the passed in entry or row. More...
 
virtual bool prepare_multi_value_field ()
 Prepare the corresponding multi-value field from the row. More...
 
virtual void prepare_entry_if_necessary ()
 Prepare the entry when the entry is not passed in. More...
 
virtual uint32_t skip ()
 Skip the not selected values and stop m_pos at the next selected one. More...
 

Protected Attributes

dict_index_tm_index
 Based on which index to build the entry. More...
 
const bool m_selected
 True if only the selected(bitmap set) multi-value data would be used to build the entries, otherwise false. More...
 
dtuple_tm_entry
 Entry built for the index. More...
 
uint32_t m_pos
 Multi-value data position. More...
 
const multi_value_datam_mv_data
 Multi-value data. More...
 
uint32_t m_mv_field_no
 Field number of multi-value data on the index. More...
 

Detailed Description

Class to build a series of entries based on one multi-value field.

It assumes that there is only one multi-value field on multi-value index.

Constructor & Destructor Documentation

◆ Multi_value_entry_builder()

Multi_value_entry_builder::Multi_value_entry_builder ( dict_index_t index,
dtuple_t entry,
bool  selected 
)
inline

Constructor.

◆ ~Multi_value_entry_builder()

virtual Multi_value_entry_builder::~Multi_value_entry_builder ( )
virtualdefault

Member Function Documentation

◆ begin()

dtuple_t * Multi_value_entry_builder::begin ( uint32_t  pos = 0)
inline

Get the first index entry.

If the multi-value field on the index is null, then it's the entry including the null field, otherwise, it should be the entry with multi-value data at the 'pos' position.

Parameters
[in]posposition of the multi-value array, default value will always start from 0
Returns
the first index entry to handle, the one including null multi-value field, or the multi-value data at the 'pos' position

◆ find_multi_value_field()

virtual dfield_t * Multi_value_entry_builder::find_multi_value_field ( )
protectedpure virtual

Find the multi-value field from the passed in entry or row.

m_mv_field_no should be set once the multi-value field found.

Returns
the multi-value field pointer, or nullptr if not found

Implemented in Multi_value_entry_builder_normal, and Multi_value_entry_builder_insert.

◆ last_multi_value_position()

uint32_t Multi_value_entry_builder::last_multi_value_position ( ) const
inline

Get the position of last generated multi-value data.

Returns
the position

◆ next()

dtuple_t * Multi_value_entry_builder::next ( void  )
inline

Get next index entry based on next multi-value data.

If the previous value is null, then always no next.

Returns
next index entry, or nullptr if no more multi-value data

◆ prepare_entry_if_necessary()

virtual void Multi_value_entry_builder::prepare_entry_if_necessary ( )
inlineprotectedvirtual

Prepare the entry when the entry is not passed in.

Reimplemented in Multi_value_entry_builder_normal.

◆ prepare_multi_value_field()

virtual bool Multi_value_entry_builder::prepare_multi_value_field ( )
inlineprotectedvirtual

Prepare the corresponding multi-value field from the row.

This function will set the m_mv_data if the proper field found.

Returns
true if the multi-value field with data on index found, otherwise, false

◆ skip()

virtual uint32_t Multi_value_entry_builder::skip ( )
inlineprotectedvirtual

Skip the not selected values and stop m_pos at the next selected one.

Returns
the next valid value position, or size of m_mv_data to indicate there is no more valid value

Reimplemented in Multi_value_entry_builder_normal.

Member Data Documentation

◆ m_entry

dtuple_t* Multi_value_entry_builder::m_entry
protected

Entry built for the index.

◆ m_index

dict_index_t* Multi_value_entry_builder::m_index
protected

Based on which index to build the entry.

◆ m_mv_data

const multi_value_data* Multi_value_entry_builder::m_mv_data
protected

Multi-value data.

◆ m_mv_field_no

uint32_t Multi_value_entry_builder::m_mv_field_no
protected

Field number of multi-value data on the index.

◆ m_pos

uint32_t Multi_value_entry_builder::m_pos
protected

Multi-value data position.

◆ m_selected

const bool Multi_value_entry_builder::m_selected
protected

True if only the selected(bitmap set) multi-value data would be used to build the entries, otherwise false.


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