Public Member Functions |
| Create_field (Field *field, Field *orig_field) |
Create_field * | clone (MEM_ROOT *mem_root) const |
void | create_length_to_internal_length (void) |
void | init_for_tmp_table (enum_field_types sql_type_arg, uint32 max_length, uint32 decimals, bool maybe_null, bool is_unsigned, uint pack_length=~0U) |
bool | init (THD *thd, char *field_name, enum_field_types type, char *length, char *decimals, uint type_modifier, Item *default_value, Item *on_update_value, LEX_STRING *comment, char *change, List< String > *interval_list, const CHARSET_INFO *cs, uint uint_geom_type) |
bool | field_flags_are_binary () |
ha_storage_media | field_storage_type () const |
column_format_type | column_format () const |
Public Attributes |
const char * | field_name |
const char * | change |
const char * | after |
LEX_STRING | comment |
Item * | def |
enum enum_field_types | sql_type |
ulong | length |
uint32 | char_length |
uint | decimals |
uint | flags |
uint | pack_length |
uint | key_length |
Field::utype | unireg_check |
TYPELIB * | interval |
TYPELIB * | save_interval |
List< String > | interval_list |
const CHARSET_INFO * | charset |
Field::geometry_type | geom_type |
Field * | field |
uint8 | row |
uint8 | col |
uint8 | sc_length |
uint8 | interval_id |
uint | offset |
uint | pack_flag |
Additional Inherited Members |
static void * | operator new (size_t size) throw () |
static void * | operator new[] (size_t size) throw () |
static void * | operator new[] (size_t size, MEM_ROOT *mem_root) throw () |
static void * | operator new (size_t size, MEM_ROOT *mem_root) throw () |
static void | operator delete (void *ptr, size_t size) |
static void | operator delete (void *ptr, MEM_ROOT *mem_root) |
static void | operator delete[] (void *ptr, MEM_ROOT *mem_root) |
static void | operator delete[] (void *ptr, size_t size) |
Detailed Description
Definition at line 3772 of file field.h.
Constructor & Destructor Documentation
Create_field::Create_field |
( |
Field * |
old_field, |
|
|
Field * |
orig_field |
|
) |
| |
Constructs a column definition from an actual column object. This is a reverse-engineering procedure that creates a column definition object as produced by the parser (Create_field) from a resolved column object (Field).
- Parameters
-
old_field | The column object from which the column definition is constructed. |
orig_field | Used for copying default values. This parameter may be NULL, but if present it is used for copying default values. |
Default values are copied into an Item_string unless:
- The default value is a function.
- There is no default value.
- old_field is a BLOB column.
- old_field has its data pointer improperly initialized.
Definition at line 10379 of file field.cc.
Member Function Documentation
void Create_field::create_length_to_internal_length |
( |
void |
| ) |
|
Convert create_field::length from number of characters to number of bytes.
Definition at line 9544 of file field.cc.
bool Create_field::init |
( |
THD * |
thd, |
|
|
char * |
fld_name, |
|
|
enum_field_types |
fld_type, |
|
|
char * |
fld_length, |
|
|
char * |
fld_decimals, |
|
|
uint |
fld_type_modifier, |
|
|
Item * |
fld_default_value, |
|
|
Item * |
fld_on_update_value, |
|
|
LEX_STRING * |
fld_comment, |
|
|
char * |
fld_change, |
|
|
List< String > * |
fld_interval_list, |
|
|
const CHARSET_INFO * |
fld_charset, |
|
|
uint |
fld_geom_type |
|
) |
| |
Initialize a column definition object. Column definition objects can be used to construct Field objects.
- Parameters
-
thd | Session/Thread handle. |
fld_name | Column name. |
fld_type | Column type. |
fld_length | Column length. |
fld_decimals | Number of digits to the right of the decimal point (if any.) |
fld_type_modifier | Additional type information. |
fld_default_value | Column default expression (if any.) |
fld_on_update_value | The expression in the ON UPDATE clause. |
fld_comment | Column comment. |
fld_change | Column change. |
fld_interval_list | Interval list (if any.) |
fld_charset | Column charset. |
fld_geom_type | Column geometry type (if any.) |
- Return values
-
FALSE | on success. |
TRUE | on error. |
Definition at line 9725 of file field.cc.
void Create_field::init_for_tmp_table |
( |
enum_field_types |
sql_type_arg, |
|
|
uint32 |
length_arg, |
|
|
uint32 |
decimals_arg, |
|
|
bool |
maybe_null, |
|
|
bool |
is_unsigned, |
|
|
uint |
pack_length_arg = ~0U |
|
) |
| |
Init for a tmp table field. To be extended if need be.
Definition at line 9595 of file field.cc.
Member Data Documentation
The declared default value, if any, otherwise NULL. Note that this member is NULL if the default is a function. If the column definition has a function declared as the default, the information is found in Create_field::unireg_check.
- See Also
- Create_field::unireg_check
Definition at line 3788 of file field.h.
The documentation for this class was generated from the following files: