~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/debug/module.cc

  • Committer: Brian Aker
  • Date: 2010-12-27 20:20:52 UTC
  • mto: (2023.2.10 bool)
  • mto: This revision was merged to the branch mainline in revision 2037.
  • Revision ID: brian@tangent.org-20101227202052-fzftwyo0vu02zhpa
Refactor boolean function.

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
#include <drizzled/util/backtrace.h>
42
42
#include <drizzled/function/func.h>
43
43
#include <drizzled/item/cmpfunc.h>
 
44
#include <drizzled/item/function/boolean.h>
44
45
 
45
46
using namespace drizzled;
46
47
 
47
48
namespace debug {
48
49
 
49
 
class Assert :public Item_bool_func
 
50
class Assert :public item::function::Boolean
50
51
{
51
52
public:
52
53
  Assert() :
53
 
    Item_bool_func()
 
54
    item::function::Boolean()
54
55
  {
55
56
    unsigned_flag= true;
56
57
  }
60
61
 
61
62
  bool val_bool()
62
63
  {
63
 
    drizzled::String _res;
64
 
    drizzled::String *res= args[0]->val_str(&_res);
 
64
    String _res;
 
65
    String *res= args[0]->val_str(&_res);
65
66
 
66
67
    null_value= false;
67
68
 
85
86
  }
86
87
};
87
88
 
88
 
class Backtrace :public Item_bool_func
 
89
class Backtrace :public item::function::Boolean
89
90
{
90
91
public:
91
92
  Backtrace() :
92
 
    Item_bool_func()
 
93
    item::function::Boolean()
93
94
  {
94
95
    unsigned_flag= true;
95
96
  }
99
100
 
100
101
  bool val_bool()
101
102
  {
102
 
    drizzled::util::custom_backtrace();
 
103
    util::custom_backtrace();
103
104
    return true;
104
105
  }
105
106
 
109
110
  }
110
111
};
111
112
 
112
 
class Crash :public Item_bool_func
 
113
class Crash :public item::function::Boolean
113
114
{
114
115
public:
115
116
  Crash() :
116
 
    Item_bool_func()
 
117
    item::function::Boolean()
117
118
  { }
118
119
 
119
120
  const char *func_name() const { return "crash"; }