~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/function/str/conv.h

  • Committer: Monty Taylor
  • Date: 2009-09-30 07:01:32 UTC
  • mto: This revision was merged to the branch mainline in revision 1184.
  • Revision ID: mordred@inaugust.com-20090930070132-b1ol1xu1rpajdddy
Small namespace cleanup.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
18
 */
19
19
 
20
 
#ifndef DRIZZLED_STR_FUNCTIONS_CONV_H
21
 
#define DRIZZLED_STR_FUNCTIONS_CONV_H
22
 
 
23
 
#include <drizzled/functions/str/strfunc.h> 
24
 
 
25
 
class Item_str_conv :public Item_str_func
 
20
#ifndef DRIZZLED_FUNCTION_STR_CONV_H
 
21
#define DRIZZLED_FUNCTION_STR_CONV_H
 
22
 
 
23
#include <drizzled/function/str/strfunc.h>
 
24
 
 
25
class Item_func_conv :public Item_str_func
26
26
{
27
 
protected:
28
 
  uint32_t multiply;
29
 
  my_charset_conv_case converter;
30
 
  String tmp_value;
31
27
public:
32
 
  Item_str_conv(Item *item) :Item_str_func(item) {}
 
28
  Item_func_conv(Item *a,Item *b,Item *c) :Item_str_func(a,b,c) {}
 
29
  const char *func_name() const { return "conv"; }
33
30
  String *val_str(String *);
34
 
};
35
 
 
36
 
 
37
 
class Item_func_lcase :public Item_str_conv
38
 
{
39
 
public:
40
 
  Item_func_lcase(Item *item) :Item_str_conv(item) {}
41
 
  const char *func_name() const { return "lcase"; }
42
 
  void fix_length_and_dec();
43
 
};
44
 
 
45
 
class Item_func_ucase :public Item_str_conv
46
 
{
47
 
public:
48
 
  Item_func_ucase(Item *item) :Item_str_conv(item) {}
49
 
  const char *func_name() const { return "ucase"; }
50
 
  void fix_length_and_dec();
51
 
};
52
 
 
53
 
#endif /* DRIZZLED_STR_FUNCTIONS_CONV_H */
 
31
  void fix_length_and_dec()
 
32
  {
 
33
    collation.set(default_charset());
 
34
    max_length=64;
 
35
    maybe_null= 1;
 
36
  }
 
37
};
 
38
 
 
39
#endif /* DRIZZLED_FUNCTION_STR_CONV_H */