My Project
Functions File Reference

Functions to copy data to or from fields. More...

#include "sql_priv.h"
#include "sql_class.h"
#include "sql_time.h"
#include <m_ctype.h>


type_conversion_status set_field_to_null (Field *field)
type_conversion_status set_field_to_null_with_conversions (Field *field, bool no_conversions)
type_conversion_status copy_time_to_time (Field *from, Field *to)
type_conversion_status field_conv (Field *to, Field *from)

Detailed Description

Functions to copy data to or from fields.

This could be done with a single short function but opencoding this gives much more speed.

Function Documentation

type_conversion_status field_conv ( Field to,
Field from 

Simple quick field convert that is called on insert.

type_conversion_status set_field_to_null_with_conversions ( Field field,
bool  no_conversions 

Set field to NULL or TIMESTAMP or to next auto_increment number.

fieldField to update
no_conversionsSet to 1 if we should return 1 if field can't take null values. If set to 0 we will do store the 'default value' if the field is a special field. If not we will give an error.
Return values:
0Field could take 0 or an automatic conversion was used
-1Field could not take NULL and no conversion was used. If no_conversion was not set, an error message is printed
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines