My Project
Public Member Functions | Public Attributes
Item_int Class Reference
Inheritance diagram for Item_int:
Item_num Item_basic_constant Item Item_bool Item_int_0 Item_int_with_ref Item_return_int Item_temporal Item_uint Item_temporal_with_ref Item_datetime_with_ref Item_time_with_ref

List of all members.

Public Member Functions

 Item_int (int32 i, uint length=MY_INT32_NUM_DECIMAL_DIGITS)
 Item_int (longlong i, uint length=MY_INT64_NUM_DECIMAL_DIGITS)
 Item_int (ulonglong i, uint length=MY_INT64_NUM_DECIMAL_DIGITS)
 Item_int (Item_int *item_arg)
 Item_int (const Name_string &name_arg, longlong i, uint length)
 Item_int (const char *str_arg, uint length)
enum Type type () const
enum Item_result result_type () const
enum_field_types field_type () const
longlong val_int ()
double val_real ()
my_decimalval_decimal (my_decimal *)
Stringval_str (String *)
bool get_date (MYSQL_TIME *ltime, uint fuzzydate)
bool get_time (MYSQL_TIME *ltime)
type_conversion_status save_in_field (Field *field, bool no_conversions)
bool basic_const_item () const
Itemclone_item ()
virtual void print (String *str, enum_query_type query_type)
Item_numneg ()
uint decimal_precision () const
bool eq (const Item *, bool binary_cmp) const
bool check_partition_func_processor (uchar *bool_arg)

Public Attributes

longlong value

Constructor & Destructor Documentation

Item_int::Item_int ( const char *  str_arg,
uint  length 
)

Create an item from a string we KNOW points to a valid longlong. str_arg does not necessary has to be a \0 terminated string. This is always 'signed'. Unsigned values are created with Item_uint()


Member Function Documentation

bool Item_int::eq ( const Item item,
bool  binary_cmp 
) const [virtual]

This function is called when:

  • Comparing items in the WHERE clause (when doing where optimization)
  • When trying to find an ORDER BY/GROUP BY item in the SELECT part
  • When matching fields in multiple equality objects (Item_equal)

Reimplemented from Item.

void Item_int::print ( String str,
enum_query_type  query_type 
) [virtual]

This method is used for to:

  • to generate a view definition query (SELECT-statement);
  • to generate a SQL-query for EXPLAIN EXTENDED;
  • to generate a SQL-query to be shown in INFORMATION_SCHEMA;
  • debug.

For more information about view definition query, INFORMATION_SCHEMA query and why they should be generated from the Item-tree,

See also:
mysql_register_view().

Reimplemented from Item.

Reimplemented in Item_temporal_with_ref, and Item_uint.

type_conversion_status Item_int::save_in_field ( Field field,
bool  no_conversions 
) [virtual]

Store this item's int-value in a field

Parameters:
fieldThe field where the int value is to be stored
no_conversionsOnly applies if the value to store is NULL (null_value is true) and NULL is not allowed in field. In that case: if no_coversion is true, do nothing and return with error TYPE_ERR_NULL_CONSTRAINT_VIOLATION. If no_coversion is false, the field's default value is stored if one exists. Otherwise an error is returned.
Return values:
TYPE_OKStoring of value went fine without warnings or errors
!TYPE_OKWarning/error as indicated by type_conversion_status enum value

Reimplemented from Item.

Reimplemented in Item_int_with_ref, Item_uint, and Item_temporal.


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