#include <item_cmpfunc.h>
|
virtual void | set (uint pos, Item *item)=0 |
|
virtual void | sort_array ()=0 |
| Sort the IN-list array, so we can do efficient lookup with binary_search. More...
|
|
◆ in_vector()
in_vector::in_vector |
( |
uint |
elements | ) |
|
|
inlineexplicit |
See Item_func_in::resolve_type() for why we need both count and used_count.
◆ ~in_vector()
virtual in_vector::~in_vector |
( |
| ) |
|
|
virtualdefault |
◆ cleanup()
virtual void in_vector::cleanup |
( |
| ) |
|
|
inlinevirtual |
◆ compare_elems()
virtual bool in_vector::compare_elems |
( |
uint |
pos1, |
|
|
uint |
pos2 |
|
) |
| const |
|
pure virtual |
◆ create_item()
Create an instance of Item_{type} (e.g.
Item_decimal) constant object which type allows it to hold an element of this vector without any conversions. The purpose of this function is to be able to get elements of this vector in form of Item_xxx constants without creating Item_xxx object for every array element you get (i.e. this implements "FlyWeight" pattern)
- Parameters
-
mem_root | Where to allocate the Item. |
Implemented in in_row, in_string, in_longlong, in_datetime_as_longlong, in_time_as_longlong, in_datetime, in_double, and in_decimal.
◆ fill()
bool in_vector::fill |
( |
Item ** |
items, |
|
|
uint |
item_count |
|
) |
| |
Fill the vector by evaluating the items passed as arguments.
Note that null values are skipped so the vector may end up containing fewer elements than the number of items. The vector is sorted so that it can be used for binary search.
- Parameters
-
items | Items to evaluate |
item_count | Number of items |
- Returns
- true if any null values was found, false otherwise.
◆ find_item()
virtual bool in_vector::find_item |
( |
Item * |
item | ) |
|
|
pure virtual |
Calls item->val_int() or item->val_str() etc.
and then does binary_search if the value is non-null.
- Parameters
-
item | to evaluate, and lookup in the IN-list. |
- Returns
- true if evaluated value of the item was found.
Implemented in in_string, in_longlong, in_double, in_decimal, and in_row.
◆ is_row_result()
virtual bool in_vector::is_row_result |
( |
| ) |
const |
|
inlinevirtual |
◆ set()
virtual void in_vector::set |
( |
uint |
pos, |
|
|
Item * |
item |
|
) |
| |
|
privatepure virtual |
◆ sort_array()
virtual void in_vector::sort_array |
( |
| ) |
|
|
privatepure virtual |
◆ value_to_item()
Store the value at position pos into provided item object.
- Parameters
-
pos | Index of value to store |
item | Constant item to store value into. The item must be of the same type that create_item() returns. |
Implemented in in_string, in_longlong, in_double, in_decimal, and in_row.
◆ m_size
const uint in_vector::m_size |
|
private |
◆ m_used_size
uint in_vector::m_used_size {0} |
The actual size of the vector (NULL may be ignored)
The documentation for this class was generated from the following files: