~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item/boolean.h

  • Committer: Mark Atwood
  • Date: 2011-07-16 00:12:54 UTC
  • mfrom: (2363.1.4 drizzle-trunk)
  • Revision ID: me@mark.atwood.name-20110716001254-qj28s8wqwja51sy6
Resolve merge, etc for boolean fix.

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
 
49
49
  enum Type type() const { return BOOLEAN_ITEM; }
50
50
 
 
51
  Item_result result_type() const
 
52
  {
 
53
    return INT_RESULT;
 
54
  }
 
55
 
51
56
  virtual bool val_bool()
52
57
  {
53
58
    return value;
66
71
  drizzled::String* val_str(drizzled::String *value_buffer)
67
72
  {
68
73
    value_buffer->realloc(5);
69
 
    value_buffer->append(value ? "TRUE" : "FALSE");
 
74
 
 
75
    if (value)
 
76
    {
 
77
      value_buffer->copy("TRUE", 4, default_charset());
 
78
    }
 
79
    else
 
80
    {
 
81
      value_buffer->copy("FALSE", 5, default_charset());
 
82
    }
 
83
 
70
84
    return value_buffer;
71
85
  }
72
86