~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/create_field.h

  • Committer: Lee Bieber
  • Date: 2011-03-29 22:31:41 UTC
  • mfrom: (2257.1.3 build)
  • Revision ID: kalebral@gmail.com-20110329223141-yxc22h3l2he58sk0
Merge Andrew - 743842: Build failure using GCC 4.6
Merge Stewart - 738022: CachedDirectory silently fails to add entries if stat() fails
Merge Olaf - Common fwd: add copyright, add more declaration

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
18
 */
19
19
 
20
 
#ifndef DRIZZLED_CREATE_FIELD_H
21
 
#define DRIZZLED_CREATE_FIELD_H
22
 
 
23
 
#include "drizzled/field.h"
24
 
 
25
 
namespace drizzled
26
 
{
27
 
 
28
 
class Item;
29
 
typedef struct st_typelib TYPELIB;
 
20
#pragma once
 
21
 
 
22
#include <drizzled/field.h>
 
23
 
 
24
namespace drizzled {
30
25
 
31
26
/**
32
27
 * Class representing a field in a CREATE TABLE statement.
43
38
  LEX_STRING comment; /**< A comment for this field */
44
39
  Item *def; /**< Default value for the new field */
45
40
  enum enum_field_types sql_type; /**< The data type of the new field */
 
41
 
 
42
  enum_field_types type() const
 
43
  {
 
44
    return sql_type;
 
45
  }
 
46
 
46
47
  /**
47
48
   * At various stages in execution this can be length of field in bytes or
48
49
   * max number of characters.
60
61
  Field::utype unireg_check; /**< See Field::unireg_check */
61
62
  TYPELIB *interval; /**< Which interval to use (ENUM types..) */
62
63
  List<String> interval_list;
63
 
  const CHARSET_INFO *charset; /**< Character set for the column -- @TODO should be deleted */
 
64
  const charset_info_st *charset; /**< Character set for the column -- @TODO should be deleted */
64
65
  Field *field; // For alter table
65
66
 
66
67
  uint8_t interval_id;  // For rea_create_table
116
117
            char *length,
117
118
            char *decimals,
118
119
            uint32_t type_modifier,
119
 
            Item *default_value,
120
 
            Item *on_update_value,
121
120
            LEX_STRING *comment,
122
121
            char *change,
123
122
            List<String> *interval_list,
124
 
            const CHARSET_INFO * const cs,
 
123
            const charset_info_st * const cs,
125
124
            uint32_t uint_geom_type,
126
125
            enum column_format_type column_format);
 
126
 
 
127
  bool setDefaultValue(Item *default_value, Item *on_update_item);
127
128
};
128
129
 
 
130
std::ostream& operator<<(std::ostream& output, const CreateField &field);
 
131
 
129
132
} /* namespace drizzled */
130
133
 
131
 
#endif /* DRIZZLED_CREATE_FIELD_H */