My Project
Public Member Functions | Protected Member Functions
Field_temporal_with_date_and_time Class Reference

#include <field.h>

Inheritance diagram for Field_temporal_with_date_and_time:
Field_temporal_with_date Field_temporal Field Field_datetime Field_temporal_with_date_and_timef Field_timestamp Field_datetimef Field_timestampf

List of all members.

Public Member Functions

 Field_temporal_with_date_and_time (uchar *ptr_arg, uchar *null_ptr_arg, uchar null_bit_arg, enum utype unireg_check_arg, const char *field_name_arg, uint8 dec_arg)
void store_timestamp (const struct timeval *tm)

Protected Member Functions

void init_timestamp_flags ()
virtual void store_timestamp_internal (const struct timeval *tm)=0
bool convert_TIME_to_timestamp (THD *thd, const MYSQL_TIME *ltime, struct timeval *tm, int *error)

Detailed Description

Abstract class for types with date and time, with or without fractional part: DATETIME, DATETIME(N), TIMESTAMP, TIMESTAMP(N).


Constructor & Destructor Documentation

Field_temporal_with_date_and_time::Field_temporal_with_date_and_time ( uchar *  ptr_arg,
uchar *  null_ptr_arg,
uchar  null_bit_arg,
enum utype  unireg_check_arg,
const char *  field_name_arg,
uint8  dec_arg 
) [inline]

Constructor for Field_temporal_with_date_and_time

Parameters:
ptr_argSee Field definition
null_ptr_argSee Field definition
null_bit_argSee Field definition
unireg_check_argSee Field definition
field_name_argSee Field definition
dec_argNumber of second fraction digits, 0..6.

Member Function Documentation

Initialize flags for TIMESTAMP DEFAULT CURRENT_TIMESTAMP / ON UPDATE CURRENT_TIMESTAMP columns.

Todo:
get rid of TIMESTAMP_FLAG and ON_UPDATE_NOW_FLAG.
virtual void Field_temporal_with_date_and_time::store_timestamp_internal ( const struct timeval *  tm) [protected, pure virtual]

Store "struct timeval" value into field. The value must be properly rounded or truncated according to the number of fractional second digits.

Implemented in Field_datetimef, Field_datetime, Field_timestampf, and Field_timestamp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines