1
/* - mode: c++ c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
4
* Copyright (C) 2008 MySQL
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; either version 2 of the License, or
9
* (at your option) any later version.
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21
#ifndef DRIZZLED_FIELD_NULL_H
22
#define DRIZZLED_FIELD_NULL_H
24
#include <drizzled/field/str.h>
30
* Everything saved in this will disappear. It will always return NULL
33
class Field_null :public Field_str
35
static unsigned char null[1];
43
Field_null(unsigned char *ptr_arg,
45
const char *field_name_arg,
46
const CHARSET_INFO * const cs)
54
enum_field_types type() const
56
return DRIZZLE_TYPE_NULL;
58
int store(const char *, uint32_t, const CHARSET_INFO * const)
68
int store(int64_t, bool)
73
int store_decimal(const my_decimal *)
90
my_decimal *val_decimal(my_decimal *)
94
String *val_str(String *, String *value2)
99
int cmp(const unsigned char *, const unsigned char *)
103
void sort_string(unsigned char *, uint32_t)
105
uint32_t pack_length() const
109
void sql_type(String &str) const;
110
uint32_t size_of() const
112
return sizeof(*this);
114
uint32_t max_display_length()
120
} /* namespace drizzled */
122
#endif /* DRIZZLED_FIELD_NULL_H */