MySQL 8.0.30
Source Code Documentation
Cached_item Class Referenceabstract

This is used for segregating rows in groups (e.g. More...

#include <item.h>

Inheritance diagram for Cached_item:
[legend]

Public Member Functions

virtual ~Cached_item ()=default
 
virtual bool cmp ()=0
 Compare the value associated with the item with the stored value. More...
 
Itemget_item ()
 
Item ** get_item_ptr ()
 

Public Attributes

bool null_value {true}
 

Protected Member Functions

 Cached_item (Item *i)
 

Protected Attributes

Itemitem
 The item whose value to cache. More...
 

Detailed Description

This is used for segregating rows in groups (e.g.

GROUP BY, windows), to detect boundaries of groups. It caches a value, which is representative of the group, and can compare it to another row, and update its value when entering a new group.

Constructor & Destructor Documentation

◆ Cached_item()

Cached_item::Cached_item ( Item i)
inlineexplicitprotected

◆ ~Cached_item()

virtual Cached_item::~Cached_item ( )
virtualdefault

Member Function Documentation

◆ cmp()

virtual bool Cached_item::cmp ( )
pure virtual

Compare the value associated with the item with the stored value.

If they are different, update the stored value with item's value and return true.

Returns
true if item's value and stored value are different. Notice that first call is to establish an initial value and return value should be ignored.

Implemented in Cached_item_str, Cached_item_json, Cached_item_real, Cached_item_int, Cached_item_temporal, and Cached_item_decimal.

◆ get_item()

Item * Cached_item::get_item ( )
inline

◆ get_item_ptr()

Item ** Cached_item::get_item_ptr ( )
inline

Member Data Documentation

◆ item

Item* Cached_item::item
protected

The item whose value to cache.

◆ null_value

bool Cached_item::null_value {true}

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