Drizzled Public API Documentation

drizzled::CreateField Class Reference

#include <create_field.h>

Inheritance diagram for drizzled::CreateField:
drizzled::memory::SqlAlloc

List of all members.

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)

Static Public Member Functions

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)
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 *, Root &)
static void operator delete (void *, Root *)
static void operator delete[] (void *)
static void operator delete[] (void *, Root &)
static void operator delete[] (void *, Root *)

Public Attributes

const char * field_name
const char * change
const char * after
str_ref comment
Itemdef
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
TYPELIBinterval
List< Stringinterval_list
const charset_info_stcharset
Fieldfield
uint8_t interval_id
uint32_t offset

Detailed Description

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.


Constructor & Destructor Documentation

drizzled::CreateField::CreateField ( Field old_field,
Field orig_field 
)

Member Function Documentation

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.

Referenced by drizzled::prepare_create_table().

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.

Parameters:
sessionThread handle
fld_nameField name
fld_typeField type
fld_lengthField length
fld_decimalsDecimal (if any)
fld_type_modifierAdditional type information
fld_default_valueField default value (if any)
fld_on_update_valueThe value of ON UPDATE clause
fld_commentField comment
fld_changeField change
fld_interval_listInterval list (if any)
fld_charsetField charset
Return values:
falseon success
trueon 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.

Note:
This is currently ONLY used in Item_sum_distinct::setup()

Init for a tmp table field. To be extended if need be.

Definition at line 163 of file create_field.cc.

Referenced by drizzled::Item_sum_distinct::setup().


Member Data Documentation

const char* drizzled::CreateField::after

Put this new Field after this Field

Definition at line 37 of file create_field.h.

Referenced by drizzled::prepare_alter_table().

const char* drizzled::CreateField::change

If done with alter table

Definition at line 36 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 56 of file create_field.h.

Referenced by drizzled::prepare_create_table().

const charset_info_st* drizzled::CreateField::charset

Character set for the column – should be deleted

Definition at line 64 of file create_field.h.

Referenced by drizzled::prepare_create_table().

str_ref drizzled::CreateField::comment

A comment for this field

Definition at line 38 of file create_field.h.

Item* drizzled::CreateField::def

Default value for the new field

Definition at line 39 of file create_field.h.

Referenced by drizzled::prepare_create_table().

const char* drizzled::CreateField::field_name

Name of the field to be created

Definition at line 35 of file create_field.h.

Referenced by drizzled::prepare_alter_table(), and drizzled::prepare_create_table().

TYPELIB* drizzled::CreateField::interval

Which interval to use (ENUM types..)

Definition at line 62 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 51 of file create_field.h.

Referenced by drizzled::prepare_create_table().

enum_field_types drizzled::CreateField::sql_type

The data type of the new field

Definition at line 40 of file create_field.h.

Referenced by drizzled::prepare_create_table().

Field::utype drizzled::CreateField::unireg_check

See Field::unireg_check

Definition at line 61 of file create_field.h.

Referenced by drizzled::prepare_create_table().


The documentation for this class was generated from the following files: