~ubuntu-branches/ubuntu/saucy/drizzle/saucy-proposed

« back to all changes in this revision

Viewing changes to drizzled/item/null.h

  • Committer: Package Import Robot
  • Author(s): Clint Byrum
  • Date: 2012-06-19 10:46:49 UTC
  • mfrom: (1.1.6)
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20120619104649-e2l0ggd4oz3um0f4
Tags: upstream-7.1.36-stable
ImportĀ upstreamĀ versionĀ 7.1.36-stable

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 
20
20
#pragma once
21
21
 
22
 
#include <drizzled/charset_info.h>
 
22
#include <drizzled/charset.h>
23
23
#include <drizzled/item/basic_constant.h>
24
24
 
25
 
namespace drizzled
26
 
{
 
25
namespace drizzled {
27
26
 
28
 
class Item_null :public Item_basic_constant
 
27
class Item_null : public Item_basic_constant
29
28
{
30
29
public:
31
30
 
32
 
  Item_null(char *name_par=0)
 
31
  Item_null(const char *name_par=0)
33
32
  {
34
33
    maybe_null= null_value= true;
35
34
    max_length= 0;
36
 
    name= name_par ? name_par : (char*) "NULL";
 
35
    name= name_par ? name_par : "NULL";
37
36
    fixed= 1;
38
37
    collation.set(&my_charset_bin, DERIVATION_IGNORABLE);
39
38
  }
40
 
  enum Type type() const { return NULL_ITEM; }
 
39
  Type type() const { return NULL_ITEM; }
41
40
  bool eq(const Item *item, bool binary_cmp) const;
42
41
  double val_real();
43
42
  int64_t val_int();
45
44
  type::Decimal *val_decimal(type::Decimal *);
46
45
  int save_in_field(Field *field, bool no_conversions);
47
46
  int save_safe_in_field(Field *field);
48
 
  bool send(plugin::Client *client, String *str);
 
47
  void send(plugin::Client *client, String *str);
49
48
  enum Item_result result_type () const { return STRING_RESULT; }
50
49
  enum_field_types field_type() const   { return DRIZZLE_TYPE_NULL; }
51
50
  bool basic_const_item() const { return 1; }
54
53
 
55
54
  virtual void print(String *str);
56
55
 
57
 
  Item *safe_charset_converter(const CHARSET_INFO * const tocs);
 
56
  Item *safe_charset_converter(const charset_info_st * const tocs);
58
57
};
59
58
 
60
59
class Item_null_result :public Item_null