My Project
Public Member Functions | Public Attributes
Item_float Class Reference
Inheritance diagram for Item_float:
Item_num Item_basic_constant Item Item_static_float_func

List of all members.

Public Member Functions

 Item_float (const char *str_arg, uint length)
 Item_float (const Name_string name_arg, double val_arg, uint decimal_par, uint length)
 Item_float (double value_par, uint decimal_par)
type_conversion_status save_in_field (Field *field, bool no_conversions)
enum Type type () const
enum_field_types field_type () const
double val_real ()
longlong val_int ()
Stringval_str (String *)
my_decimalval_decimal (my_decimal *)
bool get_date (MYSQL_TIME *ltime, uint fuzzydate)
bool get_time (MYSQL_TIME *ltime)
bool basic_const_item () const
Itemclone_item ()
Item_numneg ()
virtual void print (String *str, enum_query_type query_type)
bool eq (const Item *, bool binary_cmp) const

Public Attributes

double value

Constructor & Destructor Documentation

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

This function is only called during parsing:

  • when parsing SQL query from sql_yacc.yy
  • when parsing XPath query from item_xmlfunc.cc We will signal an error if value is not a true double value (overflow): eng: Illegal s '%-.192s' value found during parsing

Note: str_arg does not necessarily have to be a null terminated string, e.g. it is NOT when called from item_xmlfunc.cc or sql_yacc.yy.


Member Function Documentation

bool Item_float::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_float::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_static_float_func.

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

Save a temporal value in packed longlong format into a Field. Used in optimizer.

Parameters:
OUTfield The field to set the value to.
Return values:
0On success.
>0In error.

Reimplemented from Item.


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