|
drizzle
C++ MySQL-protocol-compatible database server
|
#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 = nullptr |
| const char * | change = nullptr |
| const char * | after = nullptr |
| str_ref | comment |
| Item * | def = nullptr |
| enum_field_types | sql_type = enum_field_types() |
| uint32_t | length = 0 |
| TYPELIB * | interval = nullptr |
| List< String > | interval_list |
| const charset_info_st * | charset = nullptr |
| Field * | field = nullptr |
| uint8_t | interval_id = 0 |
| uint32_t | offset = 0 |
Additional Inherited Members | |
| Static Public Member Functions inherited from drizzled::memory::SqlAlloc | |
| static void * | operator new (size_t size) |
| static void * | operator new[] (size_t size) |
| static void * | operator new (size_t size, Root &root) |
| static void * | operator new[] (size_t size, Root &root) |
| static void * | operator new (size_t size, Root *root) |
| static void * | operator new[] (size_t size, Root *root) |
| static void | operator delete (void *) |
| static void | operator delete[] (void *) |
| static void | operator delete (void *, Root &) |
| static void | operator delete[] (void *, Root &) |
| static void | operator delete (void *, Root *) |
| static void | operator delete[] (void *, Root *) |
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.
|
inline |
Definition at line 74 of file create_field.h.
| 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.
| 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.
Definition at line 342 of file create_field.cc.
|
inline |
Definition at line 42 of file create_field.h.
| const char* drizzled::CreateField::after = nullptr |
Put this new Field after this Field
Definition at line 37 of file create_field.h.
| const char* drizzled::CreateField::change = nullptr |
If done with alter table
Definition at line 36 of file create_field.h.
| const charset_info_st* drizzled::CreateField::charset = nullptr |
Character set for the column – @TODO should be deleted
Definition at line 64 of file create_field.h.
| str_ref drizzled::CreateField::comment |
A comment for this field
Definition at line 38 of file create_field.h.
| Item* drizzled::CreateField::def = nullptr |
Default value for the new field
Definition at line 39 of file create_field.h.
| Field* drizzled::CreateField::field = nullptr |
Definition at line 65 of file create_field.h.
| const char* drizzled::CreateField::field_name = nullptr |
Name of the field to be created
Definition at line 35 of file create_field.h.
| TYPELIB* drizzled::CreateField::interval = nullptr |
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. */ uint32_t char_length= 0; uint32_t decimals= 0; uint32_t flags= 0; uint32_t pack_length= 0; uint32_t key_length= 0; Field::utype unireg_check= Field::utype(); /**< See Field::unireg_check Which interval to use (ENUM types..)
Definition at line 62 of file create_field.h.
| uint8_t drizzled::CreateField::interval_id = 0 |
Definition at line 67 of file create_field.h.
Definition at line 63 of file create_field.h.
| uint32_t drizzled::CreateField::length = 0 |
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.
| uint32_t drizzled::CreateField::offset = 0 |
Definition at line 68 of file create_field.h.
| enum_field_types drizzled::CreateField::sql_type = enum_field_types() |
The data type of the new field
Definition at line 40 of file create_field.h.