MySQL 9.1.0
Source Code Documentation
|
#include <table.h>
Public Attributes | |
const char * | field_name |
This is used as column name. More... | |
uint | field_length |
For string-type columns, this is the maximum number of characters. More... | |
enum_field_types | field_type |
This denotes data type for the column. More... | |
int | value |
uint | field_flags |
This is used to set column attributes. More... | |
const char * | old_name |
uint | open_method |
uint ST_FIELD_INFO::field_flags |
This is used to set column attributes.
By default, columns are NOT
NULL
and SIGNED
, and you can deviate from the default by setting the appropriate flags. You can use either one of the flags MY_I_S_MAYBE_NULL
and MY_I_S_UNSIGNED
or combine them using the bitwise or operator |. Both flags are defined in table.h.
uint ST_FIELD_INFO::field_length |
For string-type columns, this is the maximum number of characters.
Otherwise, it is the 'display-length' for the column. For the data type MYSQL_TYPE_DATETIME this field specifies the number of digits in the fractional part of time value.
const char* ST_FIELD_INFO::field_name |
This is used as column name.
enum_field_types ST_FIELD_INFO::field_type |
This denotes data type for the column.
For the most part, there seems to be one entry in the enum for each SQL data type, although there seem to be a number of additional entries in the enum.
const char* ST_FIELD_INFO::old_name |
uint ST_FIELD_INFO::open_method |
int ST_FIELD_INFO::value |