MySQL 9.1.0
Source Code Documentation
cmp_item Class Referenceabstract

#include <item_cmpfunc.h>

Inheritance diagram for cmp_item:
[legend]

Public Member Functions

 cmp_item ()=default
 
virtual ~cmp_item ()=default
 
virtual bool allocate_value_comparators (MEM_ROOT *mem_root, cmp_item *tmpl, Item *arg)
 Allocate comparator objects for each value object, based on the template comparator objects. More...
 
virtual void store_value (Item *item)=0
 
virtual int cmp (Item *item)=0
 
virtual int compare (const cmp_item *item) const =0
 
virtual cmp_itemmake_same ()=0
 
virtual void store_value_by_template (cmp_item *, Item *item)
 

Static Public Member Functions

static cmp_itemnew_comparator (THD *thd, Item_result result_type, Item *item, const CHARSET_INFO *cs)
 Create an appropriate comparator for the given type. More...
 

Constructor & Destructor Documentation

◆ cmp_item()

cmp_item::cmp_item ( )
default

◆ ~cmp_item()

virtual cmp_item::~cmp_item ( )
virtualdefault

Member Function Documentation

◆ allocate_value_comparators()

bool cmp_item::allocate_value_comparators ( MEM_ROOT mem_root,
cmp_item tmpl,
Item arg 
)
virtual

Allocate comparator objects for each value object, based on the template comparator objects.

Only implemented for derived class cmp_item_row.

Parameters
mem_rootmem_root for allocation.
tmplThe template item object.
argThe value item.
Returns
false if success, true if error.

Reimplemented in cmp_item_row.

◆ cmp()

virtual int cmp_item::cmp ( Item item)
pure virtual
Returns
result (true, false or UNKNOWN) of "stored argument's value <> item's value"

Implemented in cmp_item_string, cmp_item_json, cmp_item_int, cmp_item_datetime, cmp_item_real, cmp_item_decimal, and cmp_item_row.

◆ compare()

virtual int cmp_item::compare ( const cmp_item item) const
pure virtual

◆ make_same()

virtual cmp_item * cmp_item::make_same ( )
pure virtual

◆ new_comparator()

cmp_item * cmp_item::new_comparator ( THD thd,
Item_result  result_type,
Item item,
const CHARSET_INFO cs 
)
static

Create an appropriate comparator for the given type.

Parameters
thdSession handle.
result_typeUsed to find the appropriate comparator.
itemItem object used to distinguish temporal types.
csCharset
Returns
new cmp_item_xxx object, or nullptr if error.

◆ store_value()

virtual void cmp_item::store_value ( Item item)
pure virtual

◆ store_value_by_template()

virtual void cmp_item::store_value_by_template ( cmp_item ,
Item item 
)
inlinevirtual

Reimplemented in cmp_item_row.


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