Item_str_func Class Reference

#include <item_strfunc.h>

Inheritance diagram for Item_str_func:

Inheritance graph
[legend]
Collaboration diagram for Item_str_func:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Item_str_func ()
 Item_str_func (Item *a)
 Item_str_func (Item *a, Item *b)
 Item_str_func (Item *a, Item *b, Item *c)
 Item_str_func (Item *a, Item *b, Item *c, Item *d)
 Item_str_func (Item *a, Item *b, Item *c, Item *d, Item *e)
 Item_str_func (List< Item > &list)
longlong val_int ()
double val_real ()
enum Item_result result_type () const
void left_right_max_length ()

Constructor & Destructor Documentation

Item_str_func::Item_str_func  )  [inline]
 

00027 :Item_func() { decimals=NOT_FIXED_DEC; }

Item_str_func::Item_str_func Item a  )  [inline]
 

00028 :Item_func(a) {decimals=NOT_FIXED_DEC; }

Item_str_func::Item_str_func Item a,
Item b
[inline]
 

00029 :Item_func(a,b) { decimals=NOT_FIXED_DEC; }

Item_str_func::Item_str_func Item a,
Item b,
Item c
[inline]
 

00030 :Item_func(a,b,c) { decimals=NOT_FIXED_DEC; }

Item_str_func::Item_str_func Item a,
Item b,
Item c,
Item d
[inline]
 

00031 :Item_func(a,b,c,d) {decimals=NOT_FIXED_DEC; }

Item_str_func::Item_str_func Item a,
Item b,
Item c,
Item d,
Item e
[inline]
 

00032 :Item_func(a,b,c,d,e) {decimals=NOT_FIXED_DEC; }

Item_str_func::Item_str_func List< Item > &  list  )  [inline]
 

00033 :Item_func(list) {decimals=NOT_FIXED_DEC; }


Member Function Documentation

void Item_str_func::left_right_max_length  ) 
 

00964 {
00965   max_length=args[0]->max_length;
00966   if (args[1]->const_item())
00967   {
00968     int length=(int) args[1]->val_int()*collation.collation->mbmaxlen;
00969     if (length <= 0)
00970       max_length=0;
00971     else
00972       set_if_smaller(max_length,(uint) length);
00973   }
00974 }

enum Item_result Item_str_func::result_type  )  const [inline, virtual]
 

Reimplemented from Item.

Reimplemented in Item_func_now.

00036 { return STRING_RESULT; }

longlong Item_str_func::val_int  )  [virtual]
 

Implements Item.

Reimplemented in Item_func_elt, Item_func_now, Item_func_from_unixtime, Item_func_convert_tz, Item_func_sec_to_time, and Item_date_add_interval.

00074 {
00075   DBUG_ASSERT(fixed == 1);
00076   int err;
00077   char buff[22];
00078   String *res, tmp(buff,sizeof(buff), &my_charset_bin);
00079   res= val_str(&tmp);
00080   return (res ?
00081           my_strntoll(res->charset(), res->ptr(), res->length(), 10, NULL,
00082                       &err) :
00083           (longlong) 0);
00084 }

double Item_str_func::val_real  )  [virtual]
 

Implements Item.

Reimplemented in Item_func_elt, Item_func_now, Item_func_from_unixtime, Item_func_convert_tz, Item_func_sec_to_time, and Item_date_add_interval.

00063 {
00064   DBUG_ASSERT(fixed == 1);
00065   int err;
00066   char buff[64];
00067   String *res, tmp(buff,sizeof(buff), &my_charset_bin);
00068   res= val_str(&tmp);
00069   return res ? my_strntod(res->charset(), (char*) res->ptr(),res->length(),
00070                           NULL, &err) : 0.0;
00071 }


The documentation for this class was generated from the following files:
Generated on Thu Feb 24 12:02:10 2005 for MySQL by  doxygen 1.3.9.1