~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item/create.cc

  • Committer: Stewart Smith
  • Date: 2010-02-15 02:54:58 UTC
  • mto: (1273.13.96 build)
  • mto: This revision was merged to the branch mainline in revision 1308.
  • Revision ID: stewart@flamingspork.com-20100215025458-92w7ssbd7x4ipaqe
move HEX() and UNHEX() to hex_functions plugin.

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
#include <drizzled/function/str/elt.h>
32
32
#include <drizzled/function/str/export_set.h>
33
33
#include <drizzled/function/str/format.h>
34
 
#include <drizzled/function/str/hex.h>
35
34
#include <drizzled/function/str/load_file.h>
36
35
#include <drizzled/function/str/make_set.h>
37
36
#include <drizzled/function/str/pad.h>
708
707
};
709
708
 
710
709
 
711
 
class Create_func_hex : public Create_func_arg1
712
 
{
713
 
public:
714
 
  using Create_func_arg1::create;
715
 
 
716
 
  virtual Item *create(Session *session, Item *arg1);
717
 
 
718
 
  static Create_func_hex s_singleton;
719
 
 
720
 
protected:
721
 
  Create_func_hex() {}
722
 
  virtual ~Create_func_hex() {}
723
 
};
724
 
 
725
 
 
726
710
class Create_func_ifnull : public Create_func_arg2
727
711
{
728
712
public:
1367
1351
};
1368
1352
 
1369
1353
 
1370
 
class Create_func_unhex : public Create_func_arg1
1371
 
{
1372
 
public:
1373
 
  using Create_func_arg1::create;
1374
 
 
1375
 
  virtual Item *create(Session *session, Item *arg1);
1376
 
 
1377
 
  static Create_func_unhex s_singleton;
1378
 
 
1379
 
protected:
1380
 
  Create_func_unhex() {}
1381
 
  virtual ~Create_func_unhex() {}
1382
 
};
1383
 
 
1384
 
 
1385
1354
class Create_func_unix_timestamp : public Create_native_func
1386
1355
{
1387
1356
public:
2041
2010
  return new (session->mem_root) Item_func_max(*item_list);
2042
2011
}
2043
2012
 
2044
 
 
2045
 
Create_func_hex Create_func_hex::s_singleton;
2046
 
 
2047
 
Item*
2048
 
Create_func_hex::create(Session *session, Item *arg1)
2049
 
{
2050
 
  return new (session->mem_root) Item_func_hex(arg1);
2051
 
}
2052
 
 
2053
 
 
2054
2013
Create_func_ifnull Create_func_ifnull::s_singleton;
2055
2014
 
2056
2015
Item*
2614
2573
  return new (session->mem_root) Item_func_ucase(arg1);
2615
2574
}
2616
2575
 
2617
 
 
2618
 
Create_func_unhex Create_func_unhex::s_singleton;
2619
 
 
2620
 
Item*
2621
 
Create_func_unhex::create(Session *session, Item *arg1)
2622
 
{
2623
 
  return new (session->mem_root) Item_func_unhex(arg1);
2624
 
}
2625
 
 
2626
 
 
2627
2576
Create_func_unix_timestamp Create_func_unix_timestamp::s_singleton;
2628
2577
 
2629
2578
Item*
2725
2674
  { { C_STRING_WITH_LEN("FROM_DAYS") }, BUILDER(Create_func_from_days)},
2726
2675
  { { C_STRING_WITH_LEN("FROM_UNIXTIME") }, BUILDER(Create_func_from_unixtime)},
2727
2676
  { { C_STRING_WITH_LEN("GREATEST") }, BUILDER(Create_func_greatest)},
2728
 
  { { C_STRING_WITH_LEN("HEX") }, BUILDER(Create_func_hex)},
2729
2677
  { { C_STRING_WITH_LEN("IFNULL") }, BUILDER(Create_func_ifnull)},
2730
2678
  { { C_STRING_WITH_LEN("INSTR") }, BUILDER(Create_func_instr)},
2731
2679
  { { C_STRING_WITH_LEN("ISNULL") }, BUILDER(Create_func_isnull)},
2770
2718
  { { C_STRING_WITH_LEN("TIME_FORMAT") }, BUILDER(Create_func_time_format)},
2771
2719
  { { C_STRING_WITH_LEN("TO_DAYS") }, BUILDER(Create_func_to_days)},
2772
2720
  { { C_STRING_WITH_LEN("UCASE") }, BUILDER(Create_func_ucase)},
2773
 
  { { C_STRING_WITH_LEN("UNHEX") }, BUILDER(Create_func_unhex)},
2774
2721
  { { C_STRING_WITH_LEN("UNIX_TIMESTAMP") }, BUILDER(Create_func_unix_timestamp)},
2775
2722
  { { C_STRING_WITH_LEN("UPPER") }, BUILDER(Create_func_ucase)},
2776
2723
  { { C_STRING_WITH_LEN("UUID") }, BUILDER(Create_func_uuid)},