My Project
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Friends
Arg_comparator Class Reference
Inheritance diagram for Arg_comparator:
Sql_alloc

List of all members.

Public Member Functions

 Arg_comparator (Item **a1, Item **a2)
int set_compare_func (Item_result_field *owner, Item_result type)
int set_compare_func (Item_result_field *owner_arg)
int set_cmp_func (Item_result_field *owner_arg, Item **a1, Item **a2, Item_result type)
int set_cmp_func (Item_result_field *owner_arg, Item **a1, Item **a2, bool set_null_arg)
int compare ()
int compare_string ()
int compare_binary_string ()
int compare_real ()
int compare_decimal ()
int compare_int_signed ()
int compare_int_signed_unsigned ()
int compare_int_unsigned_signed ()
int compare_int_unsigned ()
int compare_time_packed ()
int compare_e_time_packed ()
int compare_row ()
int compare_e_string ()
int compare_e_binary_string ()
int compare_e_real ()
int compare_e_decimal ()
int compare_e_int ()
int compare_e_int_diff_signedness ()
int compare_e_row ()
int compare_real_fixed ()
int compare_e_real_fixed ()
int compare_datetime ()
Item ** cache_converted_constant (THD *thd, Item **value, Item **cache, Item_result type)
void set_datetime_cmp_func (Item_result_field *owner_arg, Item **a1, Item **b1)
bool is_owner_equal_func ()
void cleanup ()
void set_cmp_context_for_datetime ()

Static Public Member Functions

static bool can_compare_as_dates (Item *a, Item *b, ulonglong *const_val_arg)

Public Attributes

DTCollation cmp_collation
String value1
String value2

Static Public Attributes

static arg_cmp_func comparator_matrix [5][2]

Friends

class Item_func

Member Function Documentation

Item ** Arg_comparator::cache_converted_constant ( THD *  thd_arg,
Item **  value,
Item **  cache_item,
Item_result  type 
)

Convert and cache a constant.

Parameters:
value[in] An item to cache
cache_item[out] Placeholder for the cache item
type[in] Comparison type

When given item is a constant and its type differs from comparison type then cache its value to avoid type conversion of this constant on each evaluation. In this case the value is cached and the reference to the cache is returned. Original value is returned otherwise.

Returns:
cache item or original value.

Compare strings byte by byte. End spaces are also compared.

Return values:
<0*a < *b
0*b == *b
>0*a > *b

Compare unsigned *a with signed *b or signed *a with unsigned *b.

Compare strings, but take into account that NULL == NULL.

Compare arguments using numeric packed representation for '<=>'.

Compare signed (*a) with unsigned (*B)

Compare values as BIGINT UNSIGNED.

Compare unsigned (*a) with signed (*B)

Compare arguments using numeric packed temporal representation.


Member Data Documentation

arg_cmp_func Arg_comparator::comparator_matrix [static]
Initial value:
{{&Arg_comparator::compare_string,     &Arg_comparator::compare_e_string},
 {&Arg_comparator::compare_real,       &Arg_comparator::compare_e_real},
 {&Arg_comparator::compare_int_signed, &Arg_comparator::compare_e_int},
 {&Arg_comparator::compare_row,        &Arg_comparator::compare_e_row},
 {&Arg_comparator::compare_decimal,    &Arg_comparator::compare_e_decimal}}

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines