~posulliv/drizzle/optimizer-style-cleanup

« back to all changes in this revision

Viewing changes to drizzled/item/create.cc

  • Committer: Padraig O'Sullivan
  • Date: 2010-03-15 14:05:26 UTC
  • mfrom: (1237.9.99 staging)
  • Revision ID: osullivan.padraig@gmail.com-20100315140526-opbgwdwn6tfecdkq
MergeĀ fromĀ trunk.

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>
38
37
#include <drizzled/function/str/repeat.h>
39
38
#include <drizzled/function/str/str_conv.h>
40
 
#include <drizzled/function/str/substr.h>
41
39
#include <drizzled/function/str/trim.h>
42
 
#include <drizzled/function/str/uuid.h>
43
40
 
44
41
#include <drizzled/function/time/date_format.h>
45
42
#include <drizzled/function/time/dayname.h>
708
705
};
709
706
 
710
707
 
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
708
class Create_func_ifnull : public Create_func_arg2
727
709
{
728
710
public:
1277
1259
};
1278
1260
 
1279
1261
 
1280
 
class Create_func_substr_index : public Create_func_arg3
1281
 
{
1282
 
public:
1283
 
  using Create_func_arg3::create;
1284
 
 
1285
 
  virtual Item *create(Session *session, Item *arg1, Item *arg2, Item *arg3);
1286
 
 
1287
 
  static Create_func_substr_index s_singleton;
1288
 
 
1289
 
protected:
1290
 
  Create_func_substr_index() {}
1291
 
  virtual ~Create_func_substr_index() {}
1292
 
};
1293
 
 
1294
 
 
1295
1262
class Create_func_tan : public Create_func_arg1
1296
1263
{
1297
1264
public:
1367
1334
};
1368
1335
 
1369
1336
 
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
1337
class Create_func_unix_timestamp : public Create_native_func
1386
1338
{
1387
1339
public:
1395
1347
};
1396
1348
 
1397
1349
 
1398
 
class Create_func_uuid : public Create_func_arg0
1399
 
{
1400
 
public:
1401
 
  using Create_func_arg0::create;
1402
 
 
1403
 
  virtual Item *create(Session *session);
1404
 
 
1405
 
  static Create_func_uuid s_singleton;
1406
 
 
1407
 
protected:
1408
 
  Create_func_uuid() {}
1409
 
  virtual ~Create_func_uuid() {}
1410
 
};
1411
 
 
1412
 
 
1413
1350
class Create_func_weekday : public Create_func_arg1
1414
1351
{
1415
1352
public:
2041
1978
  return new (session->mem_root) Item_func_max(*item_list);
2042
1979
}
2043
1980
 
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
1981
Create_func_ifnull Create_func_ifnull::s_singleton;
2055
1982
 
2056
1983
Item*
2572
2499
}
2573
2500
 
2574
2501
 
2575
 
Create_func_substr_index Create_func_substr_index::s_singleton;
2576
 
 
2577
 
Item*
2578
 
Create_func_substr_index::create(Session *session, Item *arg1, Item *arg2, Item *arg3)
2579
 
{
2580
 
  return new (session->mem_root) Item_func_substr_index(arg1, arg2, arg3);
2581
 
}
2582
 
 
2583
2502
Create_func_tan Create_func_tan::s_singleton;
2584
2503
 
2585
2504
Item*
2614
2533
  return new (session->mem_root) Item_func_ucase(arg1);
2615
2534
}
2616
2535
 
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
2536
Create_func_unix_timestamp Create_func_unix_timestamp::s_singleton;
2628
2537
 
2629
2538
Item*
2659
2568
}
2660
2569
 
2661
2570
 
2662
 
Create_func_uuid Create_func_uuid::s_singleton;
2663
 
 
2664
 
Item*
2665
 
Create_func_uuid::create(Session *session)
2666
 
{
2667
 
  return new (session->mem_root) Item_func_uuid();
2668
 
}
2669
 
 
2670
 
 
2671
2571
Create_func_weekday Create_func_weekday::s_singleton;
2672
2572
 
2673
2573
Item*
2725
2625
  { { C_STRING_WITH_LEN("FROM_DAYS") }, BUILDER(Create_func_from_days)},
2726
2626
  { { C_STRING_WITH_LEN("FROM_UNIXTIME") }, BUILDER(Create_func_from_unixtime)},
2727
2627
  { { C_STRING_WITH_LEN("GREATEST") }, BUILDER(Create_func_greatest)},
2728
 
  { { C_STRING_WITH_LEN("HEX") }, BUILDER(Create_func_hex)},
2729
2628
  { { C_STRING_WITH_LEN("IFNULL") }, BUILDER(Create_func_ifnull)},
2730
2629
  { { C_STRING_WITH_LEN("INSTR") }, BUILDER(Create_func_instr)},
2731
2630
  { { C_STRING_WITH_LEN("ISNULL") }, BUILDER(Create_func_isnull)},
2765
2664
  { { C_STRING_WITH_LEN("SPACE") }, BUILDER(Create_func_space)},
2766
2665
  { { C_STRING_WITH_LEN("SQRT") }, BUILDER(Create_func_sqrt)},
2767
2666
  { { C_STRING_WITH_LEN("STRCMP") }, BUILDER(Create_func_strcmp)},
2768
 
  { { C_STRING_WITH_LEN("SUBSTRING_INDEX") }, BUILDER(Create_func_substr_index)},
2769
2667
  { { C_STRING_WITH_LEN("TAN") }, BUILDER(Create_func_tan)},
2770
2668
  { { C_STRING_WITH_LEN("TIME_FORMAT") }, BUILDER(Create_func_time_format)},
2771
2669
  { { C_STRING_WITH_LEN("TO_DAYS") }, BUILDER(Create_func_to_days)},
2772
2670
  { { C_STRING_WITH_LEN("UCASE") }, BUILDER(Create_func_ucase)},
2773
 
  { { C_STRING_WITH_LEN("UNHEX") }, BUILDER(Create_func_unhex)},
2774
2671
  { { C_STRING_WITH_LEN("UNIX_TIMESTAMP") }, BUILDER(Create_func_unix_timestamp)},
2775
2672
  { { C_STRING_WITH_LEN("UPPER") }, BUILDER(Create_func_ucase)},
2776
 
  { { C_STRING_WITH_LEN("UUID") }, BUILDER(Create_func_uuid)},
2777
2673
  { { C_STRING_WITH_LEN("WEEKDAY") }, BUILDER(Create_func_weekday)},
2778
2674
 
2779
2675
  { {0, 0}, NULL}