~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item/null.h

  • Committer: Brian Aker
  • Date: 2009-02-21 00:18:15 UTC
  • Revision ID: brian@tangent.org-20090221001815-x20e8h71e984lvs1
Completion (?) of uint conversion.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
3
 *
4
 
 *  Copyright (C) 2008 Sun Microsystems, Inc.
 
4
 *  Copyright (C) 2008 Sun Microsystems
5
5
 *
6
6
 *  This program is free software; you can redistribute it and/or modify
7
7
 *  it under the terms of the GNU General Public License as published by
20
20
#ifndef DRIZZLED_ITEM_NULL_H
21
21
#define DRIZZLED_ITEM_NULL_H
22
22
 
23
 
#include <drizzled/charset_info.h>
24
 
#include <drizzled/item/basic_constant.h>
25
 
 
26
 
namespace drizzled
27
 
{
28
 
 
29
23
class Item_null :public Item_basic_constant
30
24
{
31
25
public:
43
37
  double val_real();
44
38
  int64_t val_int();
45
39
  String *val_str(String *str);
46
 
  type::Decimal *val_decimal(type::Decimal *);
 
40
  my_decimal *val_decimal(my_decimal *);
47
41
  int save_in_field(Field *field, bool no_conversions);
48
42
  int save_safe_in_field(Field *field);
49
 
  bool send(plugin::Client *client, String *str);
 
43
  bool send(Protocol *protocol, String *str);
50
44
  enum Item_result result_type () const { return STRING_RESULT; }
51
45
  enum_field_types field_type() const   { return DRIZZLE_TYPE_NULL; }
52
46
  bool basic_const_item() const { return 1; }
56
50
  virtual void print(String *str, enum_query_type);
57
51
 
58
52
  Item *safe_charset_converter(const CHARSET_INFO * const tocs);
 
53
  bool check_vcol_func_processor(unsigned char *)
 
54
  { return false; }
59
55
};
60
56
 
61
57
class Item_null_result :public Item_null
68
64
  {
69
65
    save_in_field(result_field, no_conversions);
70
66
  }
 
67
  bool check_vcol_func_processor(unsigned char *)
 
68
  { return true; }
71
69
};
72
70
 
73
 
} /* namespace drizzled */
74
 
 
75
71
#endif /* DRIZZLED_ITEM_NULL_H */