MySQL 9.1.0
Source Code Documentation
ST_FIELD_INFO Struct Reference

#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
 

Member Data Documentation

◆ field_flags

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.

◆ field_length

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.

◆ field_name

const char* ST_FIELD_INFO::field_name

This is used as column name.

◆ field_type

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.

◆ old_name

const char* ST_FIELD_INFO::old_name

◆ open_method

uint ST_FIELD_INFO::open_method

◆ value

int ST_FIELD_INFO::value

The documentation for this struct was generated from the following file: