#include <create_field.h>
Public Member Functions | |
| enum_field_types | type () const |
| CreateField (Field *field, Field *orig_field) | |
| void | create_length_to_internal_length (void) |
| enum column_format_type | column_format () const |
| void | init_for_tmp_table (enum_field_types sql_type_arg, uint32_t max_length, uint32_t decimals, bool maybe_null) |
| bool | init (Session *, const char *field_name, enum_field_types type, const char *length, const char *decimals, uint32_t type_modifier, str_ref comment, const char *change, List< String > *interval_list, const charset_info_st *, uint32_t uint_geom_type, column_format_type column_format) |
| bool | setDefaultValue (Item *default_value, Item *on_update_item) |
Public Attributes | |
| const char * | field_name |
| const char * | change |
| const char * | after |
| str_ref | comment |
| Item * | def |
| enum_field_types | sql_type |
| uint32_t | length |
| uint32_t | char_length |
| uint32_t | decimals |
| uint32_t | flags |
| uint32_t | pack_length |
| uint32_t | key_length |
| Field::utype | unireg_check |
| TYPELIB * | interval |
| List< String > | interval_list |
| const charset_info_st * | charset |
| Field * | field |
| uint8_t | interval_id |
| uint32_t | offset |
Class representing a field in a CREATE TABLE statement.
Basically, all information for a new or altered field definition is contained in the Create_field class.
Definition at line 32 of file create_field.h.
Create a field suitable for create of table.
Definition at line 63 of file create_field.cc.
References drizzled::Field::comment, drizzled::Field::field_length, drizzled::Field::field_name, drizzled::Field::pack_length(), drizzled::Field::ptr, and drizzled::Table::timestamp_field.
| void drizzled::CreateField::create_length_to_internal_length | ( | void | ) |
Convert CreateField::length from number of characters to number of bytes.
Definition at line 131 of file create_field.cc.
Referenced by drizzled::prepare_create_table().
| bool drizzled::CreateField::init | ( | Session * | , |
| const char * | field_name, | ||
| enum_field_types | type, | ||
| const char * | length, | ||
| const char * | decimals, | ||
| uint32_t | type_modifier, | ||
| str_ref | comment, | ||
| const char * | change, | ||
| List< String > * | interval_list, | ||
| const charset_info_st * | fld_charset, | ||
| uint32_t | uint_geom_type, | ||
| column_format_type | column_format | ||
| ) |
Initialize field definition for create.
| session | Thread handle |
| fld_name | Field name |
| fld_type | Field type |
| fld_length | Field length |
| fld_decimals | Decimal (if any) |
| fld_type_modifier | Additional type information |
| fld_default_value | Field default value (if any) |
| fld_on_update_value | The value of ON UPDATE clause |
| fld_comment | Field comment |
| fld_change | Field change |
| fld_interval_list | Interval list (if any) |
| fld_charset | Field charset |
| false | on success |
| true | on error |
Definition at line 179 of file create_field.cc.
| void drizzled::CreateField::init_for_tmp_table | ( | enum_field_types | sql_type_arg, |
| uint32_t | length_arg, | ||
| uint32_t | decimals_arg, | ||
| bool | maybe_null | ||
| ) |
Init for a tmp table field. To be extended if need be.
Init for a tmp table field. To be extended if need be.
Definition at line 163 of file create_field.cc.
Referenced by drizzled::Item_sum_distinct::setup().
| const char* drizzled::CreateField::after |
Put this new Field after this Field
Definition at line 37 of file create_field.h.
Referenced by drizzled::prepare_alter_table().
| const char* drizzled::CreateField::change |
If done with alter table
Definition at line 36 of file create_field.h.
Referenced by drizzled::prepare_alter_table().
| uint32_t drizzled::CreateField::char_length |
The value of `length' as set by parser: is the number of characters for most of the types, or of bytes for BLOBs or numeric types.
Definition at line 56 of file create_field.h.
Referenced by drizzled::prepare_create_table().
| const charset_info_st* drizzled::CreateField::charset |
Character set for the column – should be deleted
Definition at line 64 of file create_field.h.
Referenced by drizzled::prepare_create_table().
| str_ref drizzled::CreateField::comment |
A comment for this field
Definition at line 38 of file create_field.h.
| Item* drizzled::CreateField::def |
Default value for the new field
Definition at line 39 of file create_field.h.
Referenced by drizzled::prepare_create_table().
| const char* drizzled::CreateField::field_name |
Name of the field to be created
Definition at line 35 of file create_field.h.
Referenced by drizzled::prepare_alter_table(), and drizzled::prepare_create_table().
| TYPELIB* drizzled::CreateField::interval |
Which interval to use (ENUM types..)
Definition at line 62 of file create_field.h.
Referenced by drizzled::prepare_create_table().
| uint32_t drizzled::CreateField::length |
At various stages in execution this can be length of field in bytes or max number of characters.
Definition at line 51 of file create_field.h.
Referenced by drizzled::prepare_create_table().
| enum_field_types drizzled::CreateField::sql_type |
The data type of the new field
Definition at line 40 of file create_field.h.
Referenced by drizzled::prepare_create_table().
| Field::utype drizzled::CreateField::unireg_check |
See Field::unireg_check
Definition at line 61 of file create_field.h.
Referenced by drizzled::prepare_create_table().