#include <create_field.h>
Public Member Functions | |
enum_field_types | type () const |
CreateField (Field *field, Field *orig_field) | |
CreateField * | clone (memory::Root *mem_root) const |
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 *session, char *field_name, enum_field_types type, char *length, char *decimals, uint32_t type_modifier, Item *default_value, Item *on_update_value, LEX_STRING *comment, char *change, List< String > *interval_list, const CHARSET_INFO *const cs, uint32_t uint_geom_type, enum column_format_type column_format) |
Static Public Member Functions | |
static void * | operator new (size_t size) |
static void * | operator new (size_t size, Root *mem_root) |
static void * | operator new[] (size_t size) |
static void * | operator new[] (size_t size, Root *mem_root) |
static void | operator delete (void *, size_t) |
static void | operator delete (void *, Root *) |
static void | operator delete[] (void *, Root *) |
static void | operator delete[] (void *, size_t) |
Public Attributes | |
const char * | field_name |
const char * | change |
const char * | after |
LEX_STRING | comment |
Item * | def |
enum 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 * | 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 35 of file create_field.h.
Create a field suitable for create of table.
Definition at line 62 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 132 of file create_field.cc.
Referenced by drizzled::prepare_create_table().
bool drizzled::CreateField::init | ( | Session * | session, |
char * | field_name, | ||
enum_field_types | type, | ||
char * | length, | ||
char * | decimals, | ||
uint32_t | type_modifier, | ||
Item * | default_value, | ||
Item * | on_update_value, | ||
LEX_STRING * | comment, | ||
char * | change, | ||
List< String > * | interval_list, | ||
const CHARSET_INFO *const | cs, | ||
uint32_t | uint_geom_type, | ||
enum 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 183 of file create_field.cc.
References drizzled::Item::val_str().
Referenced by drizzled::add_field_to_list().
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 164 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 40 of file create_field.h.
Referenced by drizzled::prepare_alter_table().
const char* drizzled::CreateField::change |
If done with alter table
Definition at line 39 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 59 of file create_field.h.
Referenced by drizzled::prepare_create_table().
Character set for the column -- should be deleted
Definition at line 67 of file create_field.h.
Referenced by drizzled::prepare_create_table().
A comment for this field
Definition at line 41 of file create_field.h.
Default value for the new field
Definition at line 42 of file create_field.h.
Referenced by drizzled::prepare_alter_table(), and drizzled::prepare_create_table().
const char* drizzled::CreateField::field_name |
Name of the field to be created
Definition at line 38 of file create_field.h.
Referenced by drizzled::prepare_alter_table(), and drizzled::prepare_create_table().
Which interval to use (ENUM types..)
Definition at line 65 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 54 of file create_field.h.
Referenced by drizzled::prepare_create_table().
enum enum_field_types drizzled::CreateField::sql_type |
The data type of the new field
Definition at line 43 of file create_field.h.
Referenced by drizzled::prepare_alter_table(), and drizzled::prepare_create_table().
Field::utype drizzled::CreateField::unireg_check |
See Field::unireg_check
Definition at line 64 of file create_field.h.
Referenced by drizzled::prepare_create_table().