Eneboo - Documentación para desarrolladores
src/libmysql_macosx/include/mysql_time.h
Ir a la documentación de este archivo.
00001 /* Copyright (C) 2004 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
00002 
00003  This program is free software; you can redistribute it and/or modify
00004  it under the terms of the GNU General Public License as published by
00005  the Free Software Foundation; either version 2 of the License, or
00006  (at your option) any later version.
00007 
00008  This program is distributed in the hope that it will be useful,
00009  but WITHOUT ANY WARRANTY; without even the implied warranty of
00010  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00011  GNU General Public License for more details.
00012 
00013  You should have received a copy of the GNU General Public License
00014  along with this program; if not, write to the Free Software
00015  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
00016 
00017 #ifndef _mysql_time_h_
00018 #define _mysql_time_h_
00019 
00020 /*
00021   Time declarations shared between the server and client API:
00022   you should not add anything to this header unless it's used
00023   (and hence should be visible) in mysql.h.
00024   If you're looking for a place to add new time-related declaration,
00025   it's most likely my_time.h. See also "C API Handling of Date
00026   and Time Values" chapter in documentation.
00027 */
00028 
00029 enum enum_mysql_timestamp_type
00030 {
00031   MYSQL_TIMESTAMP_NONE= -2, MYSQL_TIMESTAMP_ERROR= -1,
00032   MYSQL_TIMESTAMP_DATE= 0, MYSQL_TIMESTAMP_DATETIME= 1, MYSQL_TIMESTAMP_TIME= 2
00033 };
00034 
00035 
00036 /*
00037   Structure which is used to represent datetime values inside MySQL.
00038 
00039   We assume that values in this structure are normalized, i.e. year <= 9999,
00040   month <= 12, day <= 31, hour <= 23, hour <= 59, hour <= 59. Many functions
00041   in server such as my_system_gmt_sec() or make_time() family of functions
00042   rely on this (actually now usage of make_*() family relies on a bit weaker
00043   restriction). Also functions that produce MYSQL_TIME as result ensure this.
00044   There is one exception to this rule though if this structure holds time
00045   value (time_type == MYSQL_TIMESTAMP_TIME) days and hour member can hold
00046   bigger values.
00047 */
00048 typedef struct st_mysql_time
00049 {
00050   unsigned int  year, month, day, hour, minute, second;
00051   unsigned long second_part;
00052   my_bool       neg;
00053   enum enum_mysql_timestamp_type time_type;
00054 } MYSQL_TIME;
00055 
00056 #endif /* _mysql_time_h_ */
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'